iPhone modal view inside another modal view?

前端 未结 3 1917
夕颜
夕颜 2020-12-17 05:07

My App uses a modal view when users add a new foo. The user selects a foo type using this modal view. Depending on what type is selected, the user needs to be asked for more

3条回答
  •  既然无缘
    2020-12-17 05:47

    You need to take care on which instance you invoke the presentModalViewController when you deal with several levels of modal controllers. Let's suppose you have :

    [myControllerA presentModalViewController:myControllerB animated:YES];

    Next time you want to display a modal controller while B has the focus, you should invoke

    [myControllerB presentModalViewController:myControllerC animated:YES];

    in order to get the parent controller properly set. The hierarchy of controllers is then A-> B -> C

提交回复
热议问题