Re: iOS nib weirdness...
Re: iOS nib weirdness...
- Subject: Re: iOS nib weirdness...
- From: Steve Christensen <email@hidden>
- Date: Wed, 04 May 2011 07:53:18 -0700
Yes, the table view is typed as MyTableView in the xib.
On May 4, 2011, at 7:21 AM, Evadne Wu wrote:
> Just a wild thought, but could you probably look into the (offending) XIB and make sure that the table view is of a custom class?
>
> -ev
>
> On May 4, 2011, at 22:00, Steve Christensen wrote:
>
>> I'm working on an app that uses a tab bar. I created a new nib to set up a view+controller and added a new tab item to the main nib that references the controller and the controller's nib, plus I filled in some basic functionality in the view controller. Since it's relevant, the controller's IBOutlets are
>>
>> IBOutlet MyTableView* _resultsTable;
>> IBOutlet UIActivityIndicatorView* _searchActivityIndicator;
>> IBOutlet UISearchBar* _searchBar;
>>
>> When I ran the app and used the new view's UI, I got an unexpected "unrecognized selector" exception when trying to access a custom method in _resultsTable. When I looked at their values in the debugger, I found that _resultsTable was an instance of UITableView, not MyTableView; and _searchActivityIndicator and _searchBar were both nil.
>>
>> I thought that there could be a missing class issue, but the MyTableView class is implemented since creating a test MyTableView instance in code works just fine. That still doesn't explain the other nil values since all three views were wired up in IB: the view controller shows the views connected to the outlets and the views show themselves as connected.
>>
>> Grasping at straws, I trashed the build results and did a clean build, and even re-launched Xcode, with no difference in behavior. I could very well be doing something dumb but I'm not exactly sure where to look since I've (correctly) set up this same sort of thing before and it worked fine. BTW, I'm using Xcode 3.2.6 + iOS SDK 4.3. Any ideas?
>>
>> steve
_______________________________________________
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