Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landscape background frame incorrect #112

Open
swl367 opened this issue Oct 22, 2015 · 1 comment
Open

Landscape background frame incorrect #112

swl367 opened this issue Oct 22, 2015 · 1 comment

Comments

@swl367
Copy link

swl367 commented Oct 22, 2015

In the following code, it looks like an app in landscape mode doesn't correctly fill the screen (see attached).
simulator screen shot oct 22 2015 4 11 59 pm

+ (void)showBackground
{
    if (!__si_alert_background_window) {
        __si_alert_background_window = [[SIAlertBackgroundWindow alloc] initWithFrame:[UIScreen mainScreen].bounds
                                                                         andStyle:[SIAlertView currentAlertView].backgroundStyle];
        [__si_alert_background_window makeKeyAndVisible];
        __si_alert_background_window.alpha = 0;
        [UIView animateWithDuration:0.3
                     animations:^{
                             __si_alert_background_window.alpha = 1;
                     }];
   }
}
@swl367
Copy link
Author

swl367 commented Oct 23, 2015

looks like

        __si_alert_background_window.rootViewController = [UIViewController new];

solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant