Presenting a modal view controller immediately after dismissing another

后端 未结 8 1841
渐次进展
渐次进展 2020-12-02 12:59

I\'m dismissing a modal view controller and then immediately presenting another one, but the latter never happens. Here\'s the code:

 [self dismissModalViewContro         


        
8条回答
  •  盖世英雄少女心
    2020-12-02 13:58

    Like other animated things, dismissModalViewControllerAnimated doesn't block until the view controller disappears. Instead it "kicks off" dismissal of the view controller. You might need to use a callback in viewDidDisappear of modal controller 1 that calls something like modalViewControllerDisappeared in the parent view controller. In that method you present modal controller 2. Otherwise what Robot K said.

提交回复
热议问题