Me too had this problem in ios7 4inch display. I was using cordova 2.7. Solved this by editing in CDVSplashScreen.m file. There is a function named update - (void)updateBounds
- (void)updateBounds{
UIImage* img = _imageView.image;
CGRect imgBounds = CGRectMake(0, 0, img.size.width, img.size.height);
CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds fromView:nil].size;
// There's a special case when the image is the size of the screen.
if (CGSizeEqualToSize(screenSize, imgBounds.size)) {
CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil];
imgBounds.origin.y -= statusFrame.size.height;
//added this code for IOS7
if (CDV_IsIPhone5() && SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) {
imgBounds.origin.y=0.0f;
}
} else {
CGRect viewBounds = self.viewController.view.bounds;
CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height;
CGFloat viewAspect = viewBounds.size.width / viewBounds.size.height;
// This matches the behaviour of the native splash screen.
CGFloat ratio;
if (viewAspect > imgAspect) {
ratio = viewBounds.size.width / imgBounds.size.width;
} else {
ratio = viewBounds.size.height / imgBounds.size.height;
}
imgBounds.size.height *= ratio;
imgBounds.size.width *= ratio;
}
_imageView.frame = imgBounds;}
Added this code on the top file
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
Hope this will help other viewers also. cheers :)