拖拽一個view controller
建立兩個新的Swift文件,命名為FirstPage和SecondPage
修改兩個view controller的繼承的類
拖拽添加兩個button
右鍵拖拽首頁的button到第二頁燎潮,在彈出的窗口中選擇show
右鍵拖拽下一頁的button到SecondPageViewController.swift中钦勘,添加action方法
在方法中添加代碼
@IBAction func backClicked(_ sender: UIButton) {
self.dismiss(animated: true, completion: nil)
}