我正在制作应用程序,其中当我加载应用程序并更改方向时,它可以处理方向。但是,如果我点击任何TableViewCell在RootViewController的显示在DetailViewController表的splitViewBased应用程序,然后用SIGABRT改变方向,然后我的应用程序崩溃,并给出以下信息:我正在写iPad方向更改返回SIGABRT信号
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UITableViewReorderingSupport count]: unrecognized selector sent to instance 0x4e4eb30'
的方法手柄的方向是:
// Ensure that the view controller supports rotation and that the split view can therefore show in both portrait and landscape.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
//hot fix sometimes in multilevel bar button is shown in landscape mode.
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
[[self navigationItem] setLeftBarButtonItem:nil];
}
else {
[[self navigationItem] setLeftBarButtonItem:self.appDelegate.rootPopoverButtonItem];
}
return YES;
}
你需要包含更多的代码。有很多不同的方式可以像这样崩溃iOS应用程序。你几乎可以确定在产生这个错误的一个视图中的'didRotateTo ...'或'didRotateFrom ...'方法中有代码。 – MusiGenesis
我已经放置了我在我的应用程序中处理旋转的代码 – user1048396
您正在将消息'count'发送到'_UIUableViewReorderingSupport'。那是什么?你想要计算什么? –