【发布时间】:2015-01-21 15:23:35
【问题描述】:
这只发生在 iOS8 中。
如果我在按钮单击处理程序中运行“performSegueWithIdentifier”。例如。
- (IBAction)buttonPressed:(id)sender {
[self performSegueWithIdentifier:@"SegueFromMenuToList" sender:self];
}
然后它就可以正常工作了。
但是如果我显示一个警报视图。然后在alerview委托处理程序中,调用“performSegueWithIdentifier”,加载需要4秒!
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
[self performSegueWithIdentifier:@"SegueFromMenuToList" sender:self];
}
这仅在我第一次调用“performSegueWithIdentifier”时发生,并且仅在 iOS 8 下发生。
任何帮助将不胜感激。谢谢!
更新
尝试在 UI 线程中运行并不能解决问题。
- 如果只是第一次滞后,有什么办法可以预加载吗?
- 为什么这只发生在 iOS 8 上?
【问题讨论】:
标签: iphone performance ios8 segue uistoryboardsegue