开发者

file's owner of xib is not what i expect

开发者 https://www.devze.com 2023-04-07 13:09 出处:网络
i\'m using xcode4. i have a xib window (perhaps copyed by another one, i forgot because i have made it some times ago) named: chooseCharacter.xib

i'm using xcode4. i have a xib window (perhaps copyed by another one, i forgot because i have made it some times ago) named: chooseCharacter.xib i have the chooseCharacter.h and .m as view controller (i thought) i have added

-(IBAction)doneButtonClick;

on the chooseCharacter.h but i've not seen it in interface builder actions... i have added this on HighScoreViewController.h and it now shows up... however, if i put it on HighScoreViewController.h i must put the implementation in chooseCharacter.m or i get

-[ChooseCharacter doneButtonClick]: unrecognized selector se开发者_如何学运维nt to instance 0xcc0d9b0'

seems that the window is binded with a file's owner that is HighScoreViewController.h but search implementation in ChooseCharacter.m!!!

how can i bind the xib to the right file? thanks


found it. selecting in interface builder, file's owner and clicking in identity inspector under class was HighScoreViewController, changed to chooseCharacter now it works

0

精彩评论

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