Unwind segue from navigation back button in Swift

后端 未结 4 923
无人及你
无人及你 2020-12-14 19:15

I have a settings screen, in that I have a table cell. By clicking on that I take to another screen where user can choose an option and I want it back in the previous view c

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 20:04

    You could use some sort of delegation as you did or use a custom back button and an unwind segue.

    Better even, you could handle passing data between your view controllers using a mediator:

    http://cocoapatterns.com/passing-data-between-view-controllers/

提交回复
热议问题