0

I have tried to call [alertController presentViewController:anotherVC animated:YES]. It works, but not well. The buttons in anotherVC are in grey colour, although they can still handle clicks. And, after dismissing anotherVC, alertController is not shown correctly. It is shown at the top of the screen, and some part of it is beyond the screen.

So, is there any good way to present another UIViewController above an UIAlertController?

zhoudu
  • 623
  • 8
  • 19

2 Answers2

0

I don't think this is easily doable. You could create a second window with window level UIWindowLevelAlert and show your top most view controller in there, but having multiple windows is hard to reason about.

Tim Johnsen
  • 1,471
  • 14
  • 33
0

AlertView Controller Hierarchy is top of the window so its not possible to do this with default alertViewController .

Solution : you can create Custom alert view and handle it as you want .(easiest way)

Alok
  • 24,880
  • 6
  • 40
  • 67