我的应用程序在转换中间歇性地冻结。在管理调试模式时将其冻结,我们暂停并截取屏幕截图。一些说明:
然而,看着UI ViewHierarchy浮现出一个有趣的东西 - 有2个顶级UIWindows,其中前一个完全为空,按钮一个被过渡视图覆盖。
这里可能的罪魁祸首是什么?我的代码包含在屏幕截图下方:
// view controller
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let question = dataAccessor.objectAtIndexPath(indexPath)
delegate?.feedViewControllerDidSelect(self, question: question)
tableView.deselectRowAtIndexPath(indexPath, animated: true)
}
// delegate for viewcontroller
func feedViewControllerDidSelect(viewController: FeedViewController, question: Question) {
let questionDetailViewController = QuestionDetailViewController.create(question, delegate: self)
navigationController.pushViewController(questionDetailViewController, animated: true)
}
// Question Detail View
static func create(question: Question, delegate: QuestionDetailViewControllerDelegate?) -> QuestionDetailViewController {
let vc = StoryboardScene.QuestionDetail.instantiateQuestionDetailVC()
vc.question = question
vc.delegate = delegate
return vc
}