【发布时间】:2012-01-02 10:20:33
【问题描述】:
我已经花了很长时间停留在这个问题上:使用选项卡栏模板(没有情节提要)我可以轻松地在选项卡之间切换并在每个表中的视图之间切换,但是在 UITabBarController 和 @987654322 之间切换时@我一直尝试的任何代码都行不通。
-(IBAction)tabtoview:(id)sender{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp
forView:self.view
cache:YES];
[self.tabBarController removeFromParentViewController];
[self.view addSubview:self.mainscreen]; //Crashes here
[UIView commitAnimations];
}
与其删除tabBarController,不如在动画后隐藏/禁用它。感谢任何帮助!
【问题讨论】:
-
崩溃时的错误信息是什么?
-
SIGABRT -
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController superview]: unrecognized selector sent to instance 0x6dae9f0'
标签: iphone objective-c ios cocoa-touch uiviewcontroller