baya / my-tech-ios

https://github.com/baya/my-tech-ios/issues
0 stars 0 forks source link

不看教程实现一个ToDo App #7

Open baya opened 10 years ago

baya commented 10 years ago

两个button,一个Cancel, 另一个Done 点击Cancel,放弃当前操作,返回到前面的view 点击Done, 保存当前操作,返回到前面的view

When you perform an unwind segue, you need to specify an action, which is an action method of the view controller you want to unwind to.

// 在目标view controller实现下面的方法

- (IBAction)unwindToThisViewController:(UIStoryboardSegue *)unwindSegue
{
}

然后在storyboard里建立Cancel到unwindbyCancelToThisViewController的一个segue