作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 iOS 中使用 swift。我必须通过单击按钮从当前 UIViewController 导航回我的 rootViewController,但我没有使用 UINavigationController。
我已经对根 rootViewController 中的按钮进行了操作,该按钮触发了 segue 并通过以下代码从根 UIViewController 转到下一个 VC:
performSegue(withIdentifier: "segueSignUp", 发件人: nil)
如果没有导航 Controller ,我找不到任何答案。
最佳答案
在按钮操作中尝试一下:
@IBAction func buttonClicked(_ sender: UIButton) {
self.dismiss(animated: true, completion: nil)
}
关于ios - 如何在不使用 UINavigationController 的情况下以编程方式进入 rootViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57338806/
我是一名优秀的程序员,十分优秀!