Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

iPhone 3G, iOS 3.1.2

Posted on Jun 26, 2011 5:47 PM

Reply
3 replies

Jun 26, 2011 6:08 PM in response to msuper69

Thanks Michael,


Do I create the "moreViewController"? I thought the moreViewController is descended from UINavigationController and it was handle internally. If I do create the moreViewController I do I hook it up to the tab bar controller? As you can see I'm a level 0 with 0 points 😟 so I may need a little hand holding to get me to understand...


Cheers,

Amy

Jun 26, 2011 7:56 PM in response to amyfromodessa

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.

More than 5 tabs in tab bar controller

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.