1

I have a TableViewController (VC1) set to push-segue to another TableViewController (VC2). This connection was made in storyboard via ctrl-drag from VC1 to VC2. When the segue is performed, the app freezes and I see the CPU peg to 100% and memory usage start climbing rapidly. I started out with a custom VC2 and saw that viewWillAppear was called and the table delegate methods such as numberOfRowsInSection were being executed properly.

In an attempt to narrow down the problem I can see that even a vanilla UITableViewController (no custom controller class) as VC2 has the same problem. But when I set VC2 as just a vanilla UIViewController (not table), it segues fine.

I have about a dozen other TableView -> TableView segues elsewhere in my app that are set up the same way and no problems with them.

VC1 code:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [self performSegueWithIdentifier:@"myseguename" sender:self];
}
4

1 回答 1

4

原来我的问题是由于尝试使用外观代理设置 UITableView 的 backgroundView 引起的。在文档(https://developer.apple.com/library/ios/documentation/uikit/reference/UIAppearance_Protocol/Reference/Reference.html)中发现 UITableView backgroundView 未标记为 UI_APPEARANCE_SELECTOR。

于 2013-10-18T21:24:10.617 回答