开发者

iOS: Problems with a button which is on a UIView located in a UINavigationView which is in a UITabView

开发者 https://www.devze.com 2023-01-07 19:35 出处:网络
I have a following application structure: Tabs - Tab1 - 5. On on of the Tabs I have a navigation view and instead of having a tableview like in following tutorial:

I have a following application structure:

Tabs - Tab1 - 5. On on of the Tabs I have a navigation view and instead of having a tableview like in following tutorial: http://broadcast.oreilly.com/2009/06/tab-bars-and-navigation-bars-t开发者_运维技巧.html

I would like to have buttons on a page instead of a table view just like in this tutorial: http://fuelyourcoding.com/iphone-view-switching-tutorial/

I built the application and all the views but when I click on the button to move to the next view it crashes and I get following error message in the debugger console.

...Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView copyWithZone:]: unrecognized selector sent to instance 0x5d207b0' ... Call stack at first throw:

When just having a UINav. with buttons it works fine and the UITab works fine but together it crashes as soon as you click the button on the page. I even used a IBAction which just wrote a message into the log (NSLog) so I just cannot seem to figure out where the main issue is?


Well, it's an old question and I suppose it is already solved, but I encountered that same problem today... And I hope it may be useful to somebody.

This is just a mistake with an association of a Connection in the Interface Builder, you may have changed an outlet's name programmatically and the connection is still associated with the old name in the Interface Builder.

Solution: Go to IB and update the Connections of the affected View Controller.

0

精彩评论

暂无评论...
验证码 换一张
取 消