Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/114.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
Objective c iOS 6,Segue:PrepareForsgue在第一次点击UITableViewCell时不会被调用_Objective C_Ios_Cocoa Touch_Storyboard_Segue - Fatal编程技术网

Objective c iOS 6,Segue:PrepareForsgue在第一次点击UITableViewCell时不会被调用

Objective c iOS 6,Segue:PrepareForsgue在第一次点击UITableViewCell时不会被调用,objective-c,ios,cocoa-touch,storyboard,segue,Objective C,Ios,Cocoa Touch,Storyboard,Segue,我对赛格有意见。我的UITableViewController与其他UITableViewController有两个分段。从控制器链接到控制器的序列,而不是从单元链接到控制器的序列 代码: 邪恶的地方: -(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath { if(self.navigationKey==1) { [self performSegueWit

我对赛格有意见。我的UITableViewController与其他UITableViewController有两个分段。从控制器链接到控制器的序列,而不是从单元链接到控制器的序列

代码:

邪恶的地方:

-(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(self.navigationKey==1)
{
    [self performSegueWithIdentifier:@"segueOne" sender:self];

}
if(self.navigationKey==2 || self.navigationKey==3)
{
    [self performSegueWithIdentifier:@"segueTwo" sender:self];
}
}

一般来说,导航是有效的。当然,问题是导航在第一个选定的单元格上不起作用。非常感谢您的帮助

您正在使用tableView:did*取消选择*行索引路径:

而不是

tableView:是否*选择*行索引路径:


希望这能有所帮助,

您正在使用tableView:did*取消选择*RowAtIndexPath:

而不是

tableView:是否*选择*行索引路径:


希望这能有所帮助,

那么为什么它会在第二次点击其他单元格时出现?那么为什么它会在第二次点击其他单元格时出现?
-(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(self.navigationKey==1)
{
    [self performSegueWithIdentifier:@"segueOne" sender:self];

}
if(self.navigationKey==2 || self.navigationKey==3)
{
    [self performSegueWithIdentifier:@"segueTwo" sender:self];
}
}