sarpay
10/30/2013 - 6:54 AM

[mobile] [phonegap] [ios] (ios7 + phonegap.v.2.*) - fix splash screen jump due to showing status bar

[mobile] [phonegap] [ios] (ios7 + phonegap.v.2.*) - fix splash screen jump due to showing status bar

In X-code, open CDVSplashScreen.m 


(1) go to about line 174 and replace the line:

	imgBounds.origin.y -= statusFrame.size.height;
					with
	if(SYSTEM_VERSION_LESS_THAN(@"7.0")) { 
  		imgBounds.origin.y -= statusFrame.size.height;
	}


(2) You will also need to add the following to the top 
    of the CDVSplashScreen.m file:

	#define SYSTEM_VERSION_EQUAL_TO(v)([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
	#define SYSTEM_VERSION_GREATER_THAN(v)([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
	#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
	#define SYSTEM_VERSION_LESS_THAN(v)([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
	#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)