when showing and dismissing the mkalertview the view hierarchy is changed and the rootVC becomes the root view Controller which isn't the desired intent from the mkalertview and could cause problems if you need a reference for the original root view controller i solved the issue by saving a reference for the visible window before making the mainWindow key and visible in the show method and afterwards in the confirm and dismiss methods after hiding the manView i return the original window and set it as key and visible.
it worked for me
when showing and dismissing the mkalertview the view hierarchy is changed and the rootVC becomes the root view Controller which isn't the desired intent from the mkalertview and could cause problems if you need a reference for the original root view controller i solved the issue by saving a reference for the visible window before making the mainWindow key and visible in the show method and afterwards in the confirm and dismiss methods after hiding the manView i return the original window and set it as key and visible.
it worked for me