我遇到了这个异常,我很清楚为什么会这样:
2013-08-10 06:23:21.417 Unknown class login in Interface Builder file.
2013-08-10 06:23:41.714 [HomeViewController revealMenu]: unrecognized selector sent to instance 0x7145bf0
2013-08-10 06:23:41.716 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[HomeViewController revealMenu]: unrecognized selector sent to instance 0x7145bf0'
*** First throw call stack:
(0x1394012 0x115ce7e 0x141f4bd 0x1383bbc 0x138394e 0x1170705 0xa42c0 0xa4258 0x165021 0x16557f 0x1646e8 0xd3cef 0xd3f02 0xb1d4a 0xa3698 0x2235df9 0x2235ad0 0x1309bf5 0x1309962 0x133abb6 0x1339f44 0x1339e1b 0x22347e3 0x2234668 0xa0ffc 0x252d 0x2455 0x1)
libc++abi.dylib: terminate called throwing an exception
似乎通知我 HomeViewController 中缺少revealMenu 方法,但它就在那里
- (void)viewDidLoad
{
....
[self.btnLeft addTarget:self action:@selector(revealMenu) forControlEvents:UIControlEventTouchUpInside];
....
}
-(IBAction)revealMenu:(id)sender
{
[self.slidingViewController anchorTopViewTo:ECRight];
}