What is the proper way to dismiss a modal when using storyboards?

前端 未结 6 1124
终归单人心
终归单人心 2021-02-05 00:24

Using storyboards, what is the proper way to dismiss a modal?

  • using IBAction and writing code to dismiss after a button click?
  • using segue and notify the
6条回答
  •  不要未来只要你来
    2021-02-05 00:55

    See my answer here. It gives you two ways to dismiss the modal view controller with storyboard. I like method two described because one you add the class in your project your return from modal views can be done with no code using storyboard alone. That said, if you have implemented a delegate and delegate protocol, it is also a good place to put the dismissModalViewController statement.

提交回复
热议问题