我在我的应用程序中使用故事板。我正在使用下面的代码从 UITableView 导航到另一个 UIView。
-(void)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"showNextView" sender:self];
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"showNextView"])
{
AnotherViewController *destination = [segue destinationViewController];
// do something with the destination.
}
}
当我使用iOS 5和iOS 5.1模拟器时完全没有问题。但是当我使用 iOS 6 模拟器时出现如下错误。
线程 1:EXC_BAD_ACCESS(代码=2,地址=0x10)
排队
0x1588098: movl (%eax), %edx
在文件中
libobjc.A.dylib`objc_msg发送:
即使我将 AnotherViewController 设为纯空白视图。我仍然遇到同样的错误。
谢谢