Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions SIAlertView/SIAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,12 @@ + (void)showBackground

__si_alert_background_window = [[SIAlertBackgroundWindow alloc] initWithFrame:frame
andStyle:[SIAlertView currentAlertView].backgroundStyle];

//Fix the "Applications are expected to have a root view controller at the end of application launch"
//in iOS 9 - it worked fine without it in prior versions, hence the version control
if (floor(NSFoundationVersionNumber) >= NSFoundationVersionNumber_iOS_8_3)
__si_alert_background_window.rootViewController = [UIViewController new];

[__si_alert_background_window makeKeyAndVisible];
__si_alert_background_window.alpha = 0;
[UIView animateWithDuration:0.3
Expand Down