当我尝试执行 segue 时出现此错误...
2012-11-14 20:24:54.133 MyApp[26266:c07] nested push animation can result in corrupted navigation bar
2012-11-14 20:24:54.486 MyApp[26266:c07] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
2012-11-14 20:24:54.487 MyApp[26266:c07] Unbalanced calls to begin/end appearance transitions for <SheetDrillDownViewController: 0xa1bb980>.
这是我的设置:初始视图->下一个视图(UITableView)->最后一个视图(UITable)
每个单元格都推送到另一个视图,直到最后一个视图。我没有模态转场,我有推送转场...我将推转转场从单元格链接到下一个视图,每个视图都有不同的名称...我的 selectedRowAtIndex 方法中有一个执行转场线。我曾尝试删除该方法,有人说我在两次调用 segue,但是单击时单元格变为蓝色,并且不会推送到任何地方......我该如何解决这个错误?谢谢。
这是我的代码:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath) {
[self performSegueWithIdentifier:@"subjectDrillDown" sender:nil];
}
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
NSLog(@"Attempting to identify segue...");
// Make sure we're referring to the correct segue
if ([[segue identifier] isEqualToString:@"subjectDrillDown"]) {
NSLog(@"Segue has been identified...");
// Get reference to the destination view controller
SubjectDrillDownViewController *vc = [segue destinationViewController];
NSInteger selectedIndex = [[self.tableView indexPathForSelectedRow] row];
NSMutableDictionary *object = [tableDataSource objectAtIndex:selectedIndex];
NSString *key = [object valueForKey:@"key"];
[vc setSelectedItem:key];
NSLog(@"Switching to %@ detail view...",key);
NSLog(@"Passing dictionary to %@ view... (Source below)\n\n %@",key,[NSString stringWithFormat:@"%@", [tableDataSource objectAtIndex:selectedIndex]]);
[vc setDetailDataSourceDict:[tableDataSource objectAtIndex:selectedIndex]];
}
else {
NSLog(@"ERROR, DOUBLE CHECK SEGUE'S NAME!");
}
}
我已经看过所有其他 Stack Overflow 问题,但大多数正确答案对我不起作用......
编辑:
下一个视图能够加载,但是当我单击后退按钮时,突然多了两个视图......
更新:
我将尝试发布尝试识别 segue 的次数... NSLogs,但我的编译器突然无法运行:(