我想要呈现比屏幕小的尺寸的视图控制器vc2,如何在Swift 3中做到这一点?感谢帮助。这是我的代码:
@IBAction func leftButtonPressed(_ sender: UIButton) {
let vc2 = self.storyboard?.instantiateViewController(withIdentifier: "Controller2") as! ViewController2
vc2.modalPresentationStyle = .currentContext
present(vc2, animated: true, completion: nil)
}
Run Code Online (Sandbox Code Playgroud)