所以我有一个标签栏应用程序,我在其中放置了一个按钮以转到另一个视图。
所以在 FirstView.hi 中有那个
IBOutlet ContactMainViewController *contactMainViewController;
然后
-(IBAction)gotoContactMainViewController;
在我的 FirstView.mi 中有
-(IBAction)gotoContactMainViewController {
[self presentModalViewController:contactMainViewController animated:YES];
}
在我在 .h 中创建的 SecondView 中
-(IBAction)goBack;
在.m
-(IBAction)goBack {
[self dismissModalViewControllerAnimated:YES];
}
该应用程序运行正常,但是当我单击按钮时,出现一条绿线
[self presentModalViewController:contactMainViewController animated:YES];
并"Thread 1: Program received signal: "SIGABRT"
在控制台中说:
terminate called throwing an exception[Switching to process 3908 thread 0xb303]
谢谢你的帮助 !