【发布时间】:2012-06-01 12:55:18
【问题描述】:
我正在制作动画,所以当您从第一个屏幕单击 MyAccount 按钮时,它会将您导航到帐户视图
- (void)pushToAccount
{
AccountViewController *controller = [[AccountViewController alloc] initWithNibName:@"AccountViewController" bundle:nil];
//[self.navigationController pushViewController:controller animated:NO];
[UIView beginAnimations: @"Showinfo"context: nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[self.view addSubview:controller.view];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:NO];
[UIView commitAnimations];
}
但是,每当我点击 Account View Controller(其中包含一些按钮和图像视图)时,我的程序就会崩溃,在主类中显示 EXC_BAD_ACCESS
请就这个问题给我建议...
【问题讨论】:
-
检查你的控制器的 viewDidLoad 是否被调用?
-
是的,只要放一个断点就可以了
-
从那里开始调试,向所有方法添加断点,并找出哪里出错了。
标签: ios exc-bad-access uiviewanimation