0
我推test2ViewController在Test1ViewController.m,添加的視圖的按鈕不起作用
Test2ViewController *test2ViewController = [[Test2ViewController alloc] initWithNibName:@"Test2ViewController" bundle:nil];
[self.navigationController pushViewController:test2ViewController animated:YES];
在Test2ViewController.m,我插入一個子視圖test3ViewController,
Test3ViewController *test3ViewController = [[Test3ViewController alloc] initWithNibName:@"Test3ViewController" bundle:nil];
[self.view addSubview:test3ViewController.view];
我的問題,我想推test3ViewController中的新視圖(test4ViewController),但test3ViewController.view中的按鈕操作不起作用
-(IBAction) goButtonAction:(id) sender {
Test4ViewController *test4ViewController = [[Test4ViewController alloc] initWithNibName:@"Test4ViewController" bundle:nil];
[self.navigationController pushViewController:test4ViewController animated:YES];
}
似乎test3ViewController不在導航流程中,我如何在插入視圖上推新視圖?
感謝您的建議。我試過這個。但它仍然不起作用。 – Donny 2010-12-12 21:28:13
你確定IBAction被調用嗎? – Jumhyn 2010-12-12 21:38:28