Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
仅当使用故事板和segue时,iOS6中的EXC_BAD_访问错误_Ios6_Uistoryboardsegue_Xcode Storyboard - Fatal编程技术网

仅当使用故事板和segue时,iOS6中的EXC_BAD_访问错误

仅当使用故事板和segue时,iOS6中的EXC_BAD_访问错误,ios6,uistoryboardsegue,xcode-storyboard,Ios6,Uistoryboardsegue,Xcode Storyboard,我正在我的应用程序中使用故事板。我正在使用下面的代码从UITableView导航到另一个UIView -(void)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"showNextView" sender:self]; } -(void)prepareForSegue:(UIStoryboar

我正在我的应用程序中使用故事板。我正在使用下面的代码从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.
    }
}
当我使用iOS5和iOS5.1模拟器时,根本没有问题。但当我使用iOS6模拟器时,我得到了如下错误

线程1:EXC\u错误访问(代码=2,地址=0x10)

一致

0x1588098:  movl   (%eax), %edx
归档

libobjc.A.dylib`objc_msgSend:

甚至我也将另一个ViewController设置为纯空白视图。我仍然得到同样的错误


谢谢

我解决了我的问题。由于某些原因,我们无法在iOS 6中使用-(void)tableView:(UITableView*)tableView将选择RowatineXpath:(NSIndexPath*)indexPath。好了,我用错方法了。应使用-(NSIndexPath*)tableView:WillSelectRowatineXpath: