开发者

Universal app iPad version IBAction throwing NSInvalidArgumentException unrecognized selector

For some reason I cannot figure out I have an IBAction code wired up to fire on the touchupinside for a UIButton on a view using Interface Builder. Simple stuff right?? Well it works fine in my iphone version but for some reason I keep getting the following error when I click on the button in the iPad even though I have it wired up properly. IB has the the correct class name for files owner, it's wired to the action. I've checked and double checked my connections, rewired them from scratch, cleaned classes, deleted the app from the simulator and googled to the end of the internets.

Why would this be any different between ipad and iphone version? Can someone please help me before I go insane on something that should be working but just refuses to work???? Even weirder it seems whatever I try to wire up to an action is throwing a similar error. I'm starting to think Interface Builder is just crazy or something.

开发者_如何转开发

2010-08-15 14:19:13.372 AppName[28524:207] * -[UIViewController doClick]: unrecognized selector sent to instance 0x4d7fac0 2010-08-15 14:19:13.373 AppName[28524:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIViewController doClick]: unrecognized selector sent to instance 0x4d7fac0'


UIViewController doesn't respond to doClick: which is what you are seeing here.

In the nib file for your view, have you set the "File's Owner" to the class that you inherit from UIViewController and contains the doClick: method?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜