Re: Crash when using TableView in View managed by TabController
Re: Crash when using TableView in View managed by TabController
- Subject: Re: Crash when using TableView in View managed by TabController
- From: Trygve Inda <email@hidden>
- Date: Sun, 19 Jul 2009 07:30:00 +0000
- Thread-topic: Crash when using TableView in View managed by TabController
> I have a TabBarController that has three tabs, and each view for these is
> kept in its own nib. One of these views has a UITableView which has its
> delegate and dataSource attached to the File's Owner.
>
> The nib also has TableCell objects which are returned from:
>
> - (UITableViewCell *)tableView:(UITableView *)tableView
> cellForRowAtIndexPath:(NSIndexPath *)indexPath
>
> All is well when I load the view without the tab controller.
>
> When the TabController is used to manage the view however, I get a crash:
>
> iPhone Simulator 2.2 (77.4.9), iPhone OS 2.2.1 (5H11)
> *** Terminating app due to uncaught exception 'NSUnknownKeyException',
> reason: '[<UIViewController 0x525e10> setValue:forUndefinedKey:]: this class
> is not key value coding-compliant for the key mySwitchCell.'
>
>
> mySwitchCell is defined in the in the nib and of course works when the
> TabController is not used.
>
> How can I use a TabController to manage a view that contains a TableView?
Just in case anyone else runs into this, I did figure it out... The Class of
the target view has to be set in the tab as well as in the view's nib
itself.
T.
_______________________________________________
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