UINavigationController 的文档不包含带有 completion:
参数的 pushViewController
方法。
最佳答案
更好的解决方案是用 CATransaction 包装推送动画并设置 completionBlock。无需处理时间问题。
[CATransaction begin];
[CATransaction setCompletionBlock:^{
//whatever you want to do after the push
}];
[[self navigationController] pushViewController:viewController animated:YES];
[CATransaction commit];
关于ios - 是否可以使用完成 block 推送 View Controller ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21743780/