Finish revert and correct Xcode warnings

This commit is contained in:
Niklas Merz 2019-09-06 13:53:36 +02:00
parent 8810c6a8a0
commit 8805f5d46a

View File

@ -314,20 +314,20 @@ static CDVWKInAppBrowser* instance = nil;
dispatch_async(dispatch_get_main_queue(), ^{
if (weakSelf.inAppBrowserViewController != nil) {
float osVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
if (!tmpWindow) {
if (!self->tmpWindow) {
CGRect frame = [[UIScreen mainScreen] bounds];
if(initHidden && osVersion < 11){
frame.origin.x = -10000;
}
tmpWindow = [[UIWindow alloc] initWithFrame:frame];
self->tmpWindow = [[UIWindow alloc] initWithFrame:frame];
}
UIViewController *tmpController = [[UIViewController alloc] init];
[tmpWindow setRootViewController:tmpController];
[tmpWindow setWindowLevel:UIWindowLevelNormal];
[self->tmpWindow setRootViewController:tmpController];
[self->tmpWindow setWindowLevel:UIWindowLevelNormal];
if(!initHidden || osVersion < 11){
[tmpWindow makeKeyAndVisible];
[self->tmpWindow makeKeyAndVisible];
}
[tmpController presentViewController:nav animated:!noAnimate completion:nil];
}
@ -787,7 +787,7 @@ BOOL isExiting = FALSE;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
if (@available(iOS 11.0, *)) {
[self.webView.scrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
[self.webView.scrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
}
#endif