Problem in building a tab bar inside navigation controller
I am really frustrated and I rally hope that you will help me to solve this problem!
I'm trying to build a tab bar inside a navigation controller. I used this template provided by WiredBob. My problem is that I want to add more bar items to the tab bar, but I keep getting crash!
From the log: 2010-05-24 00:15:43.469 NavTab[9315:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "AnnView" 开发者_StackOverflow中文版nib but didn't get a UITableView.'
Also, I tried to fix the size of the a view in IB to fit in with the tab bar, but I couldn't! It was unchangeable.
Thanks in advance :-)
Heba,
Is AnnView supposed to be a UITableView? From the example, it looks like that's probably the case and maybe you are trying to use a standard XIB but have it subclassed as a UITableViewController.
Try going into interface builder, opening up AnnView.XIB and making sure the main view is a UITableView. If not, you should goto the far right tab in the inspector window and change it to a standard UIView. Or in the case that it is supposed to be a UITableView, make sure that is the main view in IB.
A reference for you:
http://twilloapp.blogspot.com/2009/03/how-to-embed-navigation-controller.html
In regards to your other question about changing the size of the view, what kind of view are you using? If it is a UITableView, you can add a "tab bar" to the view in IB to show you what it will look like and the UITableView should resize automagically to match it.
Rob
精彩评论