当我从第一个 viewController 推送到另一个 ViewController 时,需要一些时间。第一次推送后的第一次它工作正常。 InsuranceInfoViewController viewDid 加载方法中没有编写代码。期待这个推送在整个应用程序中正常工作。我正在使用 Xcode 7.0 beta6。这是 Xcode 的问题吗?
let insuranceInfoVC = self.storyboard?.instantiateViewControllerWithIdentifier("InsuranceInfoViewController") as! InsuranceInfoViewController
self.navigationController?.pushViewController(insuranceInfoVC, animated: true)
我也试过GCD
dispatch_async(dispatch_get_main_queue()) { [unowned self] in
let insuranceInfoVC = self.storyboard?.instantiateViewControllerWithIdentifier("InsuranceInfoViewController") as! InsuranceInfoViewController
self.navigationController?.pushViewController(insuranceInfoVC, animated: true)
}
最佳答案
我使用的是自定义 Roboto-Regular 字体。Roboto-Regular 字体被分配给控件,但这种字体并不存在。由于 Roboto-Regular 字体不存在,因此系统需要时间来搜索此字体,因为这需要时间。 当我更正某些控件的字体时,它加载速度很快。
关于ios - pushViewController 需要一些时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33894569/