Exception 我的应用程序无法与iOS5一起使用
由于iOs第五版的新版本,我的应用程序一直在挣扎 我可以正常启动应用程序,但当我单击选项卡项或按钮时,它会崩溃。我编写了异常代码以及它可以运行的视图代码:) 它对每个目标都有效,但在ios5上崩溃。有什么想法吗 *由于未捕获的异常“UIViewControllerHierarchyInconsistency”,正在终止应用程序,原因:“子视图” 控制器:应具有父视图 控制员:但实际的父母 是:'Exception 我的应用程序无法与iOS5一起使用,exception,uinavigationcontroller,uitabbarcontroller,ios5,uitableview,Exception,Uinavigationcontroller,Uitabbarcontroller,Ios5,Uitableview,由于iOs第五版的新版本,我的应用程序一直在挣扎 我可以正常启动应用程序,但当我单击选项卡项或按钮时,它会崩溃。我编写了异常代码以及它可以运行的视图代码:) 它对每个目标都有效,但在ios5上崩溃。有什么想法吗 *由于未捕获的异常“UIViewControllerHierarchyInconsistency”,正在终止应用程序,原因:“子视图” 控制器:应具有父视图 控制员:但实际的父母 是:' @implementation PortCIAViewController @synthesize
@implementation PortCIAViewController
@synthesize tabBarController,topHeader,myApp;
- (void)viewDidLoad {
[super viewDidLoad];
tabBarController.view.frame = CGRectMake(0, 30, 320, 430);
[self.view addSubview:tabBarController.view];
//self.view = tabBarController.view;
}
- (void)tabBarController:(UITabBarController *)tabBarControllerA didSelectViewController:(UIViewController *)viewController{
if(tabBarControllerA.selectedIndex==4){
[(PortCIAAppDelegate*)myApp activeFullScreen];
if(([(OrariViewController *)viewController segmentControllOrari].selectedSegmentIndex)==-1){
[(OrariViewController *)viewController segmentControllOrari].selectedSegmentIndex=0;
[(OrariViewController *)viewController segmentControllFascie].selectedSegmentIndex=[OrariViewController getCorrectFasciaOraria];
}
}
else{
[(PortCIAAppDelegate *)myApp deactiveFullScreen];
}
}
- (void)dealloc {
[tabBarController release];
[myApp release];
[topHeader release];
[super dealloc];
}
@end