我想通过按下"感觉幸运"按钮切换到第二个视图.当我试用我的模拟器并按下它时,它就会变成黑屏.我怎么能解决这个问题?
@IBAction func FeelingLuckyPress(sender: UIButton) {
let secondViewController:SecondViewController = SecondViewController()
self.presentViewController(secondViewController, animated: true, completion: nil)
}
Run Code Online (Sandbox Code Playgroud)