Presenting a view controller modally from an action sheet's delegate in iOS8 - iOS11

前端 未结 9 2017
我寻月下人不归
我寻月下人不归 2020-12-01 01:43

So I noticed that in iOS8 beta 3 (Update: still happens in iOS 11.2) on iPad, when attempting to present a view controller from within a delegate method of

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 02:27

    unfortunately this code doesn't work for me, I think because my problem was not calling presentController method directly but in the prepareForSegue method so using

    [segue destinationViewController]
    

    I've noticed that if the segue is "push" kind all works correctly, but if it is "modal", just in ipad, i got that error.

    Then I've found some new option in storyboard in the segue panel, and i sovled my problem choosing "Current context" for Presentation option

    I hope this will be helpful for someone else... here is the screenshot about the option

    enter image description here

提交回复
热议问题