Skip to content

Commit a9fba9b

Browse files
#2 support landscape mode
1 parent 19429d3 commit a9fba9b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/ios/AppDelegate+privacyscreen.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ - (void)applicationWillResignActive:(UIApplication *)application
2626
UIImage *splash = [UIImage imageNamed:imgName];
2727
if (splash == NULL) {
2828
self.window.hidden = YES;
29-
imageView = NULL;
3029
} else {
3130
imageView = [[UIImageView alloc]initWithFrame:[self.window frame]];
3231
[imageView setImage:splash];
33-
[UIApplication.sharedApplication.keyWindow.subviews.lastObject addSubview:imageView];
32+
[self.viewController.view addSubview:imageView];
3433
}
3534
}
3635

37-
// Code below borrowed from the CDV splashscreen plugin (https://github.com/apache/cordova-plugin-splashscreen)
38-
// Made some adjustments though, because landscape splashscreens are not available for iphone < 6 plus
36+
// Code below borrowed from the CDV splashscreen plugin @ https://github.com/apache/cordova-plugin-splashscreen
37+
// Made some adjustments though, becuase landscape splashscreens are not available for iphone < 6 plus
3938
- (CDV_iOSDevice) getCurrentDevice
4039
{
4140
CDV_iOSDevice device;

0 commit comments

Comments
 (0)