alexanderjarvis / PXAlertView

A drop-in replacement for UIAlertView that is more customisable and skinnable
MIT License
592 stars 95 forks source link

iOS 13 - Manually adding the rootViewController's view to the view hierarchy #62

Open dkechag opened 4 years ago

dkechag commented 4 years ago

I'm still using this alert view since I needed night-vision alerts on a rather niche app, with some minor fixes over the years, but with iOS 13 it seems the way the view is loaded itself won't work for long as I get:

Manually adding the rootViewController's view to the view hierarchy is no longer supported. Please allow UIWindow to add the rootViewController's view to the view hierarchy itself.

at: [self.alertWindow makeKeyAndVisible];

I haven't really tried to solve this, as it still seems to work with that warning, but in case anyone has looked at it...

PS. I looked at it and just had to remove the line self.alertWindow.rootViewController = self it seems - oh, but then landscape doesn't work, woops, I'll look at it again!