unwind大体上可以理解为go back的segue

首先需要在要跳回的Controller里写一个方法:

- (IBAction)unwindToWelcome:(UIStoryboardSegue *)unwindSegue
{
    NSLog(@"unwindToWelcome");
}

然后可以在StoryBoard里control drag到exit图标上,可以拖动一个控件,也可以拖动整个view controller

拖动一个控件,是action segue,如果拖动整个view controller,是manual segue,可以用代码触发:

ios unwind

ios unwind

ios unwind详细的说明,见这篇文章:

what are unwind segues and how to use them

相关文章:

  • 2022-01-21
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
猜你喜欢
  • 2021-10-04
  • 2022-12-23
  • 2021-08-25
  • 2021-09-22
  • 2021-12-03
  • 2022-12-23
  • 2021-09-04
相关资源
相似解决方案