File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 27
27
@class CDVWKInAppBrowserViewController;
28
28
29
29
@interface CDVWKInAppBrowser : CDVPlugin {
30
+ UIWindow * tmpWindow;
31
+
30
32
@private
31
33
NSString * _beforeload;
32
34
BOOL _waitForBeforeload;
Original file line number Diff line number Diff line change @@ -314,17 +314,18 @@ - (void)show:(CDVInvokedUrlCommand*)command withNoAnimate:(BOOL)noAnimate
314
314
dispatch_async (dispatch_get_main_queue (), ^{
315
315
if (weakSelf.inAppBrowserViewController != nil ) {
316
316
float osVersion = [[[UIDevice currentDevice ] systemVersion ] floatValue ];
317
- CGRect frame = [[UIScreen mainScreen ] bounds ];
318
- if (initHidden && osVersion < 11 ){
319
- frame.origin .x = -10000 ;
317
+ if (!tmpWindow) {
318
+ CGRect frame = [[UIScreen mainScreen ] bounds ];
319
+ if (initHidden && osVersion < 11 ){
320
+ frame.origin .x = -10000 ;
321
+ }
322
+ tmpWindow = [[UIWindow alloc ] initWithFrame: frame];
320
323
}
321
-
322
- UIWindow *tmpWindow = [[UIWindow alloc ] initWithFrame: frame];
323
324
UIViewController *tmpController = [[UIViewController alloc ] init ];
324
-
325
+
325
326
[tmpWindow setRootViewController: tmpController];
326
327
[tmpWindow setWindowLevel: UIWindowLevelNormal];
327
-
328
+
328
329
if (!initHidden || osVersion < 11 ){
329
330
[tmpWindow makeKeyAndVisible ];
330
331
}
You can’t perform that action at this time.
0 commit comments