- 有兩個ViewController,在firstViewController中按下「GO」按鈕會到secondViewController,而secondViewController有「BACK」按鈕按下可以回到firstViewController。
- 在firstViewController加入方法,名為back。
- 回到storyboard,點一下firstViewController。
接著在EXIT上按右鍵,把back方法跟BACK按鈕連接 - RUN看看吧,已經完成了

- (IBAction)back:(UIStoryboardSegue* )segue{
}
一樣要事先寫好方法
參考資料:iOS开发使用Unwind Segue进行返回
沒有留言:
張貼留言