ios - Swift 4 pop to a view controller : navigation method
问题描述
Pop To viewController : Go to Previos controller
self.navigationController?.popToViewController(AddSalesController, animated: true)
解决方案
Make sure your controller is in the navigation stack and you can try this code.
for controller in self.navigationController!.viewControllers as Array {
if controller.isKind(of: SOListScreen .self) {
self.navigationController!.popToViewController(controller, animated: true)
break
}
}
推荐阅读
- android - 切换按钮适用于 iPhone,但不适用于 Android
- python - 如何在 Python 中从列表中提取值
- asp.net-mvc - 如何集中处理不同应用程序上的长时间运行的作业?
- postgresql - 在 Postgresql 中将 WKT 转换为 WKB
- windows - 运行“gpupdate /force”后,更新的注册表值恢复为旧值
- copyleaks-api - includeHtml 没有完成它的工作
- spring-boot - 无法使用 Rest Endpoint 从 Keycloak 注销
- python - 在 KeyRelease 函数 Tkinter 中传递另一个参数
- r - How to do a lookup or match from 1 dataframe to another?
- r - 模块输出缺失