XCode4.6 Adding Navigation controller in Tab Bar

Hi All,
     Iam a beginner in IOS development.
I have installed XCode4.6 in Mac OS X Lion.
As a part of my project, I started implementing navigation controller in Tab Bar.
So I created a project with template as "Tab Bar Application".
Then I created "FirstView" derived from UIViewController.
Modified the AppDelegate.m as below:
When I run the application, two tabs are displayed: "First" and "MyCutomView"
First is the title of the FirstViewController that the template created by default.
"MyCustomView" is the title of my custom navigation controller.
When I click the tab "MyCustomView" Iam getting the following exception:
In main() ---> @autoreleasepool ---> return statement. The xception message says "Thread 1: SIGNAL SIGABRT"
Is anything Iam doing wrong?
Is this feature not supported in XCode4.6?
Looking forward for your guidance,
Vidhya

Hi,
does the nib-file of ViewController "FirstView" really is called "Navigation Controller"?
Dirk Mika

Similar Messages

  • Trouble adding new view to tab bar

    Hello All,
    I am trying to build a first Tab Bar Application through Interface Builder. I created a stock Tab Bar application using XCode but I am having trouble replacing the views with different ones (mine).
    For example, I have created a new view called PostView from XCode with just a simple label. I then went to Interface Builder, clicked on the second tab, and go to Tools->Attribute Inspector and change the NIB name from SecondView to my new PostView.
    However, when I run this, it crashes when I click on the the second tab with the following error in GDB:
    2008-06-30 23:22:26.623 TG2[5855:20b] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController loadView] loaded the "PostView" nib but no view was set.'
    I can't for the life of me figure out where I should be loading or setting this view as SecondView doesn't seem to be programmatically loaded anywhere and I can't seem to find any other reference to it in IB.
    I'm sure this is noob easy -- any ideas?
    Many thanks in advance,
    Tim

    First of all, click on File's Owner in the PostView.xib window. In the inspector window (it's on the right by default--if you don't see it, press Cmd-Shift-I), click the "i" button to display the Identity pane. There should be a drop down box labeled "Class". Is the class set to your controller class? If not, adjust it so it is.
    Next, click the blue circle with the white arrow. This will bring up the Connections pane. Look at the line that says "view". Is it connected to anything? (If it is, the name of the object it's connected to will appear next to it, with an "x" to undo the connection.)
    If not, hold down the circle to the far right of "view", then drag to the "View" icon in the PostView.xib window. (I'm assuming you haven't renamed the view.) A box should appear around the icon if it's the right type for that outlet. Now let go, and Interface Builder will establish the connection.
    Save, then go back to Xcode and build and run your project. Did that fix the problem?

  • Is there a way to opt out of the dissapearing tab bar?

    I really don't like the new feature where the tabs diasspear when you are using the internet, and then reappear whenyou hover over them. Is there a way to go back to the old feature where the tabs are stable and always there?

    Make sure that you do not run Firefox in full screen mode (press F11 or Fn + F11 to toggle).<br />
    If you are in full screen mode then hover the mouse to the top to make the Navigation Toolbar and Tab bar appear.<br />
    You can click the Maximize button at the top right to leave full screen mode or right click empty space on a toolbar and use "Exit Full Screen Mode" or press F11.<br />

  • IPhone Dev: Tab Bar Controller with nested Navigation Controller

    I want to have a tab bar with 2 views. The first view is a navigational one. I know the view can be loaded in from an external nib and I can set the first view to a navigation controller.
    My question is: can this navigation controller in the external nib instead? Ideally I want to separate it out so the tab bar loads in the external nib (that has the navigation controller). Is this possible? or the only approach is to simply have to set the view controller to a navigation controller?

    Hey, this writing an app that uses the Tab View Controller in conjunction with Navigation View Controllers is driving me bats. I took a sample program which worked well, added a nib file for a basic view that only had a label on it then:
    * I created a view controller class to work with it.
    * I added code to add create a navigation controller.
    * Added my new view controller to the navigation controller
    * added this nav controller to the array with the other stuff for the tab view controller.
    * RUN
    Everything seems to work as far as all the existing stuff. And the title for my new "tab" shows up on the More tab.
    But when I click on it (in the simulator) the program crashes. It could be how I set up the nib file I made is wrong.
    I posted the code on my web site. Here is the URL:
    http://chomer.com/iphonesample_code/05a_-_Brightness_ToolbarSwatches.zip
    Please have a look. Its probably something small and stupid that I missed.
    Regards,
    Orville

  • Xcode4 Where is the Tab Bar Controller

    Hello,
    I am learning Xcode4 now and I am trying to build a Tab bar & Nav bar combined app. There is a great video tutorial about how to do it in Xcode 3.~, but when I try to do the same in Xcode4, I get stuck because I do not find the "Tab Bar Controller" allowing me to change the type of view controllers. Opening the same project in Xcode3 is working like a charm.
    Does anyone has the same problem? Sorry, this might be a pretty dumb question, as I'm a newbe!!
    The Xcode 3.xx tutorial
    http://www.youtube.com/watch?v=LBnPfAtswgw
    The Tab Bar Controller in Xcode3
    http://eremiya.net/share/xcode4-tabbarcontroller.png

    I think I have found a solution.
    Instead of going about as you would in Xcode 3 and in the video, you follow these steps:
    Select the view controller that you wish to change to a navigation controller - This can be done by either selecting the view controller under the 'objects' section of the expanded dock on the left hand side, or selecting the tab bar button that relates to the view controller
    In the Identity Inspector, change the 'Class' drop down menu (under the 'Custom Class' header) to 'UINavigationController'
    That should work
    null

  • Tab bar based app, with 4 tabs each linking to a different navigation menu

    Hi,
    Im new to coding and I was wondering if anyone could help me out with a problem im having. Im trying ot get 4 tabs accross the bottom in a tabbar with each one linking to a navigation page. Im trying to get 5 topics on each navigation page which go into more detail to another page when clicked. so 4 tabs x 5 topics x 5 more detailed topics. I have tried the O'Rilley tutorial and could make a tabbar with 2 tabs. but I cant do 4, can anyone help?
    Thank you all in advance.

    Hi Sunny, and welcome to the Dev Forum!
    If you're using [Elisabeth Robson's tutorial|http://broadcast.oreilly.com/2009/06/tab-bars-and-navigation-bars-t.ht ml], it looks like a nice job (for a different tutorial, please let us know if we can find it online). I generally start with the Tab Bar Application template, since it does almost all the work of setting up the skeleton. But you'll certainly learn more starting with the minimal, Window-based App template, which is the purpose of a tutorial.
    The easiest way to add a new tab is to find the required controller type in the Library and drag it into the tab bar. I think you want a UINavigationController there, so choose that one from the Controllers section of the Library. You can drag the nav controller icon into either window (i.e. the Tab Bar Controller editor window or the xib window). When dragging into the xib window, you can choose the new controller's position by where you drop it in the small icon tree. (Btw, I might have missed this in the tutorial, but make sure the xib window is displaying two columns with a small icon tree to the left. This is done by setting the View Mode switch to the center position). You can also add tabs by opening the Attributes Inspector when the tab bar controller is selected and clicking "+" under the View Controllers table.
    Once you have your additional nav controllers added, build onto each one the same way you did with tab 2. If that's the only place you were stuck, you should be on your way in a few minutes.
    \- Ray

  • Loading a Tab Bar Controller

    Hi,
    I am trying to make an iPhone application where there will be a settings view that is made of a tab bar controller. I have declared the tabBarController, and linked it to the app delegate in the main window.xib file. However, when I try to switch to it by pressing my button that should start the IBAction to switch to it, the app terminates due to an uncaught exception. Here is my code:
    -(void)switchToSettings {
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:1.5];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:window cache:YES];
    [[gameViewController view] removeFromSuperview];
    [self.window addSubview:[settingsTabBarController view]];
    [UIView commitAnimations];
    gameViewController = nil;
    Someone please help! Thanks in advance.

    Hi David -
    Daviiidddd wrote:
    if there is a way to trigger a custom action when you click an item in a tab bar controller instead of loading a view.
    I think the implementation would depend on whether you wanted the custom action item to remain "selected", and if so, for how long? In other words, is the action item momentary or selectable? In either case, can we assume that tapping the action item leaves the current view visible? If not, what will the user see? Will the action item be visible from all the other views?
    As you know, normally, when you click an item in a tab bar it is going to load a view right? \[emphasis added by friendly neighborhood helper\]
    If you see most of us nodding, "yes", in agreement, it might be time to review [Tab Bars|http://developer.apple.com/iphone/library/documentation/UserExperience/Con ceptual/MobileHIG/SpecialViews/SpecialViews.html#//apple_ref/doc/uid/TP40006556- CH10-SW13] in the +iPhone Human Interface Guidelines+. Make sure your idea doesn't do something tab bars aren't expected to do. If you're not sure, look at some of the other UI options, e.g. [Toolbars|http://developer.apple.com/iphone/library/documentation/UserExperienc e/Conceptual/MobileHIG/SpecialViews/SpecialViews.html#//apple_ref/doc/uid/TP4000 6556-CH10-SW10], to see if there's a better fit for what you're doing.
    \- Ray

  • Adding an iAd Banner above a Tab Bar in existing app

    I am trying to add the iAd Banner above the Tab Bar in an existing app.
    The tab bar has 4 Buttons/Views (HomeView.xib, FirstView.xib, SecondView.xib, ThirdView.xib).
    In Interface Builder, I have tried to drag the iAd banner into the MainWindow.xib above the Tab Bar with no luck.
    I'd appreciate an explanation on what I am missing.
    Thanks for your time.
    Steve

    I had trouble getting an iAd to work when using IB as well. I ended up adding it programmatically like this:
    self.adView = [[ADBannerView alloc] initWithFrame:CGRectMake(0,412,320,50)];
    adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
    adView.delegate = self;
    [self.view addSubview:adView];
    in the - (void)viewDidLoad of my view controller.
    Hope that helps.
    -Phil

  • Triggering a custom action in a tab bar controller

    Hey guy,
    As you know, normally, when you click an item in a tab bar it is going to load a view right?
    But I was wondering if there is a way to trigger a custom action when you click an item in a tab bar controller instead of loading a view.
    If there is a way to do it, then how to do it?

    Hi David -
    Daviiidddd wrote:
    if there is a way to trigger a custom action when you click an item in a tab bar controller instead of loading a view.
    I think the implementation would depend on whether you wanted the custom action item to remain "selected", and if so, for how long? In other words, is the action item momentary or selectable? In either case, can we assume that tapping the action item leaves the current view visible? If not, what will the user see? Will the action item be visible from all the other views?
    As you know, normally, when you click an item in a tab bar it is going to load a view right? \[emphasis added by friendly neighborhood helper\]
    If you see most of us nodding, "yes", in agreement, it might be time to review [Tab Bars|http://developer.apple.com/iphone/library/documentation/UserExperience/Con ceptual/MobileHIG/SpecialViews/SpecialViews.html#//apple_ref/doc/uid/TP40006556- CH10-SW13] in the +iPhone Human Interface Guidelines+. Make sure your idea doesn't do something tab bars aren't expected to do. If you're not sure, look at some of the other UI options, e.g. [Toolbars|http://developer.apple.com/iphone/library/documentation/UserExperienc e/Conceptual/MobileHIG/SpecialViews/SpecialViews.html#//apple_ref/doc/uid/TP4000 6556-CH10-SW10], to see if there's a better fit for what you're doing.
    \- Ray

  • Using multiple UIWebView objects with a Tab Bar Controller.

    So, I'm pretty new to this cocoa touch language and seem to be hitting a road block.
    I have an application that will use a Tab Bar Controller as a navigation. Each tab will display a different UIWebView object that's been linked to their own URL's. I can't for the life of me figure out how to get past the first UIWebView. If they're all the same object, with the same name, how can I set a different url for each??
    I've been going nuts over this for the past few hours and can't find any documentation online so any help would be AMAZING. Thank you very much.
    Message was edited by: thenameisjesse

    If they're all the same object, with the same name, how can I set a different url for each??
    They're not the same object. You alloc and setup each UIWebView independently.
    UIWebView is just a view so set it up the same way you would if you had a tabbar with multiple views.
    The default template has 2 views as I recall. Change the UIViews to UIWebView. As you switch them in set the URL and have it load.

  • Why clicking the same tab of tab bar returns to the top view of navigation?

    Hi, I have a problem combing the UITabBarController and UINavigationController.
    I have 5 tabs and in some tab using navigation controller to switch the view layers.
    Suppose i'm on tab 0 and go to the second view layer of navigation controller.
    When i click the tab 0 again in the tab bar, it takes me back to the top view. It's really weired.
    Why do this happen? Can i override the effect?
    Thanks.

    Never mind. Apparently a duplicate of other threads. Possible fix: update the defective OSX Lion to Mountain Lion.

  • Problem with tab bar controller!

    I'm fairly new to xcode (and programming for that matter) so please bear with me!
    I'm creating a utilities app and would like to put tabs on the flipside view controller. a normal push segue to a tab bar controller from the flipside doesn't seem to do the job when I run it.
    I'm not sure if I need to put a tab bar on the flipside view controller itself and connect it using coding? If so, how? Or is there another solution?
    Thanks in advance!

    I have an application based on the Tab Bar template as well, yet mine works. I also have views created via IB for each tab, but there are a series of connections which need to be made for the viewDidLoad method to be called. I made some notes along the way, perhaps they are helpful.
    In these notes, what I did was create the Tab Bar project, but I didn't like the way the views were set up, so I created a series of new views, added them the way I preferred (all from files, all the same view, including the first view), and then deleted the two default views.
    - Create a Tab Bar project.
    - With XCode, create a new UIViewController for the new first view, save it, add it to the project.
    - In IB, create a new view, save it, and add it to the project.
    - In the new view's File's Owner, set the class to the new view controller.
    - Connect the view outlet to the new view created.
    - Go to the tab bar control in the MainWindow.xib and create a new view controller.
    - Select the new tab button, and type in tab name and xib filename (without the extension).
    - Compile and run. With a label in the new view, it is easy to see if it works.
    Let me know if you find the problem.

  • Facing Problems in screen navigation after adding a New custom tab to MM03

    Hi,
    I have added a new custom tab to MM03 transaction by using SPRO.This new tab is appearing in between Basic data 2 tab and Classification tab in MM03.In my new tab i have 4 sub screens and the Last sub screen has table control.Now the problem is when i slide the vertical bar in my table control it is automatically triggering the Classification screen.
    For preparing the New tab in SPRO ->SAP Reference IMG  ->Logistics-General->Material Master->Configuring the material master ->Define structure of data screen for each screen sequence ->
    Here i have created a new screen sequence 'Z5' by copying the already existing sequence '21'.Inside this new screen sequence i have created a new screen of mine by copying the already existing screen '4004'. 
    For maintaining the screen sequence i.e., to place the new tab between Basic data2 and Classification tab go to SPRO ->SAP Reference IMG  ->Logistics-General->Material Master->Configuring the material master ->Maintain order of main and additional screens.I have changed the order of main screen sequence to make our new tab the third tab.
    To make this new tab visible only for MM03 transaction i have gone to SPRO ->SAP Reference IMG  ->Logistics-General->Material Master->Configuring the material master ->Assign screen sequence to User/Material Type/Transaction/Industry sector.In this in the Transaction screen reference, I have changed the screen reference number for MM03 and i have include this new screen reference entry in the screen sequence control column.
    To create the sub screens required i have gone to  SPRO ->SAP Reference IMG  ->Logistics-General->Material Master->Configuring the material master ->Create Program for customized sub screens and have copied the standard Function group MGD1 and created 4 sub screens.
    Now to place these 4 sub screens in the order required for us i have once again gone to SPRO ->SAP Reference IMG  ->Logistics-General->Material Master->Configuring the material master ->Define structure of data screen for each screen sequence and i have selected the new screen sequence created 'Z5' created by me.Inside that i have selected the screen created by me '4004'. Now i have double clicked the Sub screen options and here i gave the sub screens numbers created by me replacing the standard sub screens. 
    Then I activated by custom function group and i started testing the MM03 transaction.
    My screen was getting populated properly and the tab movement is also fine but only problem was when i slide the table control in the fourth sub screen of my new tab i am going to fourth screen (classification).
    Can you please help me by suggesting what the problem may be, why this issue in navigation.

    Hi ,
    I have the same problem now ...
    Did you solved it?
    Thanks a lot!
    Regards,
    Hancila

  • More than 5 tabs in tab bar controller

    Hi,
    I'm totally at a lost trying to get 6 tabs connected to my tab bar controller, which was created using the tab bar controller template.  Everything thing works fine with 5 view controllers.  When I add a 6th view controller I get the "More" tab in the 5th position, which when touched opens up a table view showing 2 more tabs for the user to choose from.  Touching either row in this table view causes the app to crash.  The error reads:
    2011-06-26 20:37:25.276 TMO[2761:207] will dissapear
    2011-06-26 20:37:27.157 TMO[2761:207] -[UIMoreListController __touchesEnded:withEvent:]: unrecognized selector sent to instance 0x4c3c010
    2011-06-26 20:37:27.159 TMO[2761:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIMoreListController __touchesEnded:withEvent:]: unrecognized selector sent to instance 0x4c3c010'
    *** Call stack at first throw:
        0   CoreFoundation                      0x014285a9 __exceptionPreprocess + 185
        1   libobjc.A.dylib                     0x0157c313 objc_exception_throw + 44
        2   CoreFoundation                      0x0142a0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
        3   CoreFoundation                      0x01399966 ___forwarding___ + 966
        4   CoreFoundation                      0x01399522 _CF_forwarding_prep_0 + 50
        5   UIKit                               0x003aa0f4 forwardMethod2 + 92
        6   UIKit                               0x003aa0f4 forwardMethod2 + 92
        7   UIKit                               0x003aa0f4 forwardMethod2 + 92
        8   TMO                                 0x00006df6 -[UIView(__TapHook) __touchesEnded:withEvent:] + 51
        9   UIKit                               0x0056f4de _UIGestureRecognizerSortAndSendDelayedTouches + 3609
        10  UIKit                               0x0056fc53 _UIGestureRecognizerUpdateObserver + 927
        11  CoreFoundation                      0x0140989b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
        12  CoreFoundation                      0x0139e6e7 __CFRunLoopDoObservers + 295
        13  CoreFoundation                      0x013671d7 __CFRunLoopRun + 1575
        14  CoreFoundation                      0x01366840 CFRunLoopRunSpecific + 208
        15  CoreFoundation                      0x01366761 CFRunLoopRunInMode + 97
        16  GraphicsServices                    0x019971c4 GSEventRunModal + 217
        17  GraphicsServices                    0x01997289 GSEventRun + 115
        18  UIKit                               0x002eac93 UIApplicationMain + 1160
        19  TMO                                 0x000024fc main + 102
        20  TMO                                 0x0000248d start + 53
    terminate called after throwing an instance of 'NSException'
    Any help or direction will not go unappreciated I've scoured the web and this forum for an answer I can understand.  I did get bits of code and explanations regarding using:
        UIViewController *moreViewController = tabBarController.moreNavigationController.topViewController;
        UITableView *moreTableView = (UITableView*)moreViewController.view;
    But, it's wasn't enough me to understand how to piece it all together.
    Thanks,
    Amy

    Open Xcode, then click on 'Window', click on 'Organizer'.
    Then click on the Documentation icon.
    Seach for 'viewcontroller'.
    Read and study the documentation for the various flavors of viewcontrollers.
    Then try applying some of your newfound knowledge your code and see what happens.
    I've found that trying a few ideas based on what I've read about is the best way to learn.  Be prepared to make lots and lots of mistakes;  You'll learn something from each one.
    Above all, be patient.  This technology can't be learned in a day or a week or even a month.  It may take months before you have that 'aha!' moment.  Once you do, it will start making sense.

  • My horizontal bar , between the navigation bar and tabs bar is cluttered how do I delete some of these tabs

    i want to delete some tabs from the bar between the navigation bar and the tab bar.
    == This happened ==
    Not sure how often
    == recently

    See [[Deleting bookmarks]]
    You can open the Bookmarks Manager (Library: Bookmarks > Organize Bookmarks) and select in the left pane "All Bookmarks > Bookmarks Toolbar" and select the bookmarks that you want to remove.

Maybe you are looking for

  • Photoshop does not appear in Product List

    I am on Mac O/SX 10.9.4.  I have installed Extension Manager CC (version 7.0.0.347) and Photoshop CC 2014 (20140508.r.58 x64). I would like to use the GuideGuide (GuideGuide) extension in photoshop. I opened Photoshop, clicked on "Help > Manage Exten

  • What Camera for direct HD recording in iMovie?

    I'm running iMovie 09 on an i7 iMac. With my standard def Sony Camcorder I can record 'live' video, via a firewire cable, directly into iMovie, no need to go to tape and then import.  I now want to go HD and need a camera that can do the same type of

  • Error Messages popup in editable ALV

    Hello All, Iam working on Editable ALV  as a table maintainance for a Ztable and usng OOPs for that. Lets say i have material and plant fields for editing in ALV. If the user enters some junk value in the material field, its automatically getting val

  • Search help for customer field.

    Hi all, I have one select option on company code :  bukrs and  one on    customer number : kunnr i want search help for <b>kunnr</b> which should be based on bukrs. can any guide me how to do it. any suggestion will be rewarded. Regards cnu

  • Web Intelligence Rich Client

    HI guys, I am new to BO...just wanted to know that is there any place I can download web intelligence rich client which can work as standlone for trial period.Just want to get the feel of what this application is all about?