CB-7663 - prep for unit tests

This commit is contained in:
Shazron Abdullah 2014-09-29 14:03:58 -07:00
parent e1f17d6665
commit fcd628ffc9

View File

@ -19,6 +19,7 @@
#import "CDVSplashScreen.h"
#import <Cordova/CDVViewController.h>
#import <Cordova/CDVScreenOrientationDelegate.h>
#define kSplashScreenDurationDefault 0.25f
@ -116,8 +117,7 @@
[self.viewController.view removeObserver:self forKeyPath:@"bounds"];
}
// Sets the view's frame and image.
- (void)updateImage
- (NSString*)getImageName:(id<CDVScreenOrientationDelegate>)screenOrientationDelegate
{
UIInterfaceOrientation orientation = self.viewController.interfaceOrientation;
@ -157,6 +157,14 @@
}
}
return imageName;
}
// Sets the view's frame and image.
- (void)updateImage
{
NSString* imageName = [self getImageName:(id<CDVScreenOrientationDelegate>)self.viewController];
if (![imageName isEqualToString:_curImageName]) {
UIImage* img = [UIImage imageNamed:imageName];
_imageView.image = img;