Re: Table views in combined tab/nav interface
Re: Table views in combined tab/nav interface
- Subject: Re: Table views in combined tab/nav interface
- From: Graham Cox <email@hidden>
- Date: Sun, 3 Jan 2010 17:25:29 +1100
On 03/01/2010, at 4:55 PM, Charles Burnstagger wrote:
> I have a combined tab bar/navigation application whose navigation views each hold one table view.
>
> I've connected each navigation controller nib to a tab item in my tab bar controller and I've made the tab bar controller the root controller for the app like the docs say to.
>
> I know each of the navigation controller nibs load because I can see (and scroll) the empty tableview in each one when I tap a tab. However, *none* the nav controllers' methods ever get called - not even -awakeFromNib or -viewDidLoad. Since each nav controller's nib is connect to a tab bar item (I can see its name listed in the "view" area in IB), I assume there is nothing else I need to do load the nav controllers. Yet why don't *any* of my nav controller's methods get called when the views contained in the nav controllers load? My nav controller classes are also the datasource & delegate for the table views, respectively. I've been over the code a million times and can't find anything wrong with it. And - the same code works fine if I remove the nav view controllers and add the tableview views directly to each tab item (which is not what I want) - in that case everything works as expected and my tables fill with data. Is there something special I need
> to do when the nav controllers from the tab bar interface?
There's some confusion here about your terminology. You say "I've connected each navigation controller nib to a tab item in my tab bar".
What here, do you mean by "nib"? You can't have a nib within a nib. Do you simply mean icon? If not, you need to explain yourself, especially as you stick to that terminology further on.
If you have the navigation controller objects in the nib, are you sure you haven't also created them in your code? That's a common mistake - you don't need to do that. The object in the nib is already an instance.
I'm also wondering about "I can see its name listed in the "view" area in IB". Do you mean the icon's title? That is nothing of importance - changing that name does not set the class for the object. To do that you need to open the Inspector and set the class name in the 'Identity' section, otherwise objects still have their generic class, which will also explain why your code isn't being called.
If neither of these are it, you'll need to post your code.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden