我有一个标签栏,其中包含一个导航控制器。与此导航控制器我打开一个新的网站。这个新网站包含应打开其他网站的按钮。但是当我点击这些按钮出现错误:xcode 4 - 链接到在标签控制器中查看导航控制器
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController buttonPushTestList:]: unrecognized selector sent to instance 0x4eac880'
打开网站,在标签控制器导航控制器包含以下代码:
.h文件中:
- (IBAction) buttonPushTestList:(id)sender;
.m文件:
- (IBAction)buttonPushTestList:(id)sender {
UIViewController *testlist = [[UIViewController alloc] initWithNibName: @"TestList" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController: testlist animated:YES];
}
我做错了什么? :(
我不知道我是否理解你..我需要改变什么? – Jasmin
我修改了我的答案。 –
对不起,我不明白。有可能向您发送我的Xcode项目吗?这对我来说是紧急的,因为它是一个学校项目。 – Jasmin