Pop the current view using Segues/Storyboard on iOS 5

后端 未结 5 590
陌清茗
陌清茗 2020-12-08 11:15

I am creating an app using iOS 5 SDK. I managed to push views using the Storyboard\'s Segues, but I cannot find the proper way to pop the current view and go back to the pre

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 12:00

    You could try calling [self dismissViewControllerAnimated:YES completion:nil]; from the controller you want to dismiss (whether the controller has been pushed, or shown modally).

    Here is the related documentation : UIViewController Class Reference

    The presenting view controller is responsible for dismissing the view controller it presented. If you call this method on the presented view controller itself, it automatically forwards the message to the presenting view controller.

提交回复
热议问题