screenshot of the story board我是一名新学生,在Udemy.com学习快速开发ios。我按照其中一个例子来创建一个按钮,可以将屏幕颜色从白色变为红色;但是,我不明白为什么ios模拟器没有告诉我想要发生什么。相反,它只是让我看到一个黑屏。先谢谢你。screenshot of the ios simulator after launched
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
@IBOutlet weak var myBotton: UIButton!
@IBAction func MyBottonClicked(_ sender: UIButton) {
self.view.backgroundColor = UIColor.red
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}