[英]What's wrong with my segue code in Swift?
I'm trying to segue into a 'settings' View Controller by clicking a button, and I'm assembling it via code but don't know what I'm doing wrong.我试图通过单击一个按钮进入“设置”视图 Controller,我正在通过代码组装它,但不知道我做错了什么。
This is my button code:这是我的按钮代码:
@IBAction func settingsButton(_ sender: UIButton) {
self.performSegue(withIdentifier: "SettingsViewController", sender: self)
}
The View Controller is called 'Settings View Controller' (unsurprisingly).视图 Controller 被称为“设置视图控制器”(不出所料)。 The app crashes whenever I press on it in my Simulator.每当我在模拟器中按下它时,应用程序就会崩溃。
It'll probably be a simple thing, but any ideas what I'm doing wrong?这可能是一件简单的事情,但任何想法我做错了什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.