Handle error when splash image is missing.
From pull request: https://github.com/apache/cordova-plugin-splashscreen/pull/1
This commit is contained in:
parent
9541c1eb37
commit
d799eda020
@ -163,7 +163,7 @@
|
||||
- (void)updateBounds
|
||||
{
|
||||
UIImage* img = _imageView.image;
|
||||
CGRect imgBounds = CGRectMake(0, 0, img.size.width, img.size.height);
|
||||
CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero;
|
||||
|
||||
CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds fromView:nil].size;
|
||||
|
||||
@ -173,7 +173,7 @@
|
||||
if (!(IsAtLeastiOSVersion(@"7.0"))) {
|
||||
imgBounds.origin.y -= statusFrame.size.height;
|
||||
}
|
||||
} else {
|
||||
} else if (imgBounds.size.width > 0) {
|
||||
CGRect viewBounds = self.viewController.view.bounds;
|
||||
CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height;
|
||||
CGFloat viewAspect = viewBounds.size.width / viewBounds.size.height;
|
||||
|
Loading…
x
Reference in New Issue
Block a user