-segueForUnwindingToViewController: fromViewController: identifier: not being called

前端 未结 4 1169
广开言路
广开言路 2020-12-29 23:28

I have created a custom segue that presents a view controller inside a container that is very similar with Apple\'s own modal view controllers (I\'ve implemented it as a UIV

4条回答
  •  醉梦人生
    2020-12-30 00:14

    iOS development Library There is a discussion on iOS development Library along with this method. - segueForUnwindingToViewController:fromViewController:identifier: Make sure your MyModalViewController is the container role rather than a subcontroller of a container. If there is something like [anotherVC addChildViewController:myModalViewController];,you should put the segueForUnwindingToViewController method in some kind of "AnotherVC.m" file.

    Discussion If you implement a custom container view controller that also uses segue unwinding, you must override this method. Your method implementation should instantiate and return a custom segue object that performs whatever animation and other steps that are necessary to unwind the view controllers.

提交回复
热议问题