Re: iOS nib weirdness...
Re: iOS nib weirdness...
- Subject: Re: iOS nib weirdness...
- From: Steve Christensen <email@hidden>
- Date: Fri, 06 May 2011 01:29:10 -0700
Just to provide closure on this thread, I believe I figured out what was happening although not why nor who the exact culprit was.
To summarize, all the pieces were set up correctly. The nib file was being compiled in response to changes. The problem appears to be that at some point it stopped being copied into the simulator as part of running it in the debugger. I'm not sure if it was Xcode, the simulator or what. I ended up deleting the app from the simulator, rebuilding everything, and haven't seen the problem since. Very strange and something I haven't run into before.
On May 4, 2011, at 7:00 AM, 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