Objective c iOS 6,Segue:PrepareForsgue在第一次点击UITableViewCell时不会被调用
我对赛格有意见。我的UITableViewController与其他UITableViewController有两个分段。从控制器链接到控制器的序列,而不是从单元链接到控制器的序列 代码: 邪恶的地方: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
-(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];
}
}