最後編輯
經過進一步調查我認爲這將是最好的sepcific問題的詳細信息重新發布的問題。iOS7問題與自定義單元格選擇模式視圖控制器賽格瑞
這個問題似乎只發生在iOS7上。我已經在iOS6上進行了測試,並且這個工作沒有問題。
- 設置 設置是你有一個UIViewController
(例如第一個VC),它包含一個tableView並且是數據源/委託。 當tableView中的單元格被選中/點擊時,執行第二個視圖控制器的繼續(現在可以是空的)。
問題
問題是,segue不會立即發生。如預期的那樣在一秒之內。在segue中沒有數據被傳入,或者在第二個視圖控制器中加載了任何數據,所以您希望它是即時的。
有時,這可以正常工作,沒有任何問題。 其他時候,你會點擊單元格,什麼都不會發生。
- 注意趨勢 我注意到的是,當'問題'發生時。模擬器/設備將等待直到下一分鐘開始,然後強制通過模態視圖控制器的負載。 或 發生問題時,您可以再次單擊/輕觸設備屏幕上的任意位置以「強制」負載。
這個問題可以在一個新的項目中重現,只是基礎知識。我有uploaded a sample project zip that includes this。
附加代碼(如果需要)
我有一個自定義單元格設置。當選擇小區予執行以下步驟:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"%s",__PRETTY_FUNCTION__);
if (indexPath.section == 0) {
[self performSegueWithIdentifier:@"selectGameTurnDiff" sender:self];
}
}
我然後必須在prepareForSegue以下:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
NSLog(@"%s",__PRETTY_FUNCTION__);
[super prepareForSegue:segue sender:sender];
}
測井
下面是一些示例日誌顯示此: 第1趟
2013-10-09 23:54:09.855 App [14954:a0b] - [FirstViewController tableView:didSelectRowAtIndexPath:]
2013-10-09 23:54:09.857 App [14954:a0b] - [FirstVie wController prepareForSegue:sender:]
2013-10-09 23:55:00.004 App [14954:a0b] - [SecondViewController viewDidLoad]
2013-10-09 23:55:00.004 App [14954:a0b] - [SecondViewController viewWillAppear中:]
2013年10月9日23:55:00.511應用[14954:A0B] - [SecondViewController viewDidAppear:]
運行2
2013年10月9日23:56:21.900應用[14954: [FirstViewController tableView:didSelectRowAtIndexPath:]
2013-10-09 23:57:00.003 App [14954:a0b] - [FirstViewController prepareForSegue:sender:]
2013-10-09 23:57:00.003 App [ 14954:a0b] - [SecondViewControlle r viewDidLoad]
2013-10-09 23:57:00。003應用[14954:A0B] - [SecondViewController viewWillAppear中:]
2013年10月9日23:57:00.508應用[14954:A0B] - [SecondViewController viewDidAppear:]
運行3
2013-10-應用程序[14954:a0b] - [FirstViewController prepareForSegue:發件人:]
2013年1月23日23:57:43.387應用程序[14954:a0b] - [FirstViewController tableView:didSelectRowAtIndexPath:
2013-10-09 23:57:43.388 2013- 10-09 23:58:00.004 App [14954:a0b] - [SecondViewController viewDidLoad]
2013-10-09 23:58:00.004 App [14954:a0b] - [SecondViewController viewWillAppear:]
2013-10-09 23:58:00.510應用[14954:a0b] - [SecondViewController viewDidAppear:]
嘗試使用儀器進行分析。當創建'MESSelectTurnGuessDiffViewController'時,請嘗試記錄日誌,加載視圖... – Wain
我將在儀器中使用哪個配置文件模板來查看發生了什麼? – StuartM
時間分析。你沒有通過,樂器正在記錄事情需要多長時間並向你展示結果。 – Wain