iphone - How to display splash image in ios 7 & ios6 -
i working on ios 7 & ios 6 3.5 inches , 4 inches screen ios. working on splash screen both versions. in ios 7 4-inches screen display proper way. in ios 6 4-inch screen not display properly. have issues alignment. ios 7 3.5 inches getting alignment issues. ios 6 3.5 inches displays find. dont know how fix alignment issues. sample code:
#define system_version_greater_than_or_equal_to(v) ([[[uidevice currentdevice] systemversion] compare:v options:nsnumericsearch] != nsorderedascending) if (system_version_greater_than_or_equal_to(@"7.0")) { splashview=[[uiimageview alloc]initwithframe:cgrectmake(0, 20, 320, 548)]; splashview.image=[uiimage imagenamed:@"screens copy.png"]; [self.view addsubview:splashview]; splashview.autoresizingmask = uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexiblerightmargin |uiviewautoresizingflexiblebottommargin | uiviewautoresizingflexibletopmargin; } else { splashview=[[uiimageview alloc]initwithframe:cgrectmake(0, 0, 320, 480)]; splashview.image=[uiimage imagenamed:@"small-screen1.png"]; [self.view addsubview:splashview]; splashview.autoresizingmask = uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexiblerightmargin |uiviewautoresizingflexiblebottommargin | uiviewautoresizingflexibletopmargin; }
hope see through problem:
splash screens
the image displays naming convention of splash screens. can either use assets catalog or go old school.
update
old pattern helpful iphone app developed in x-code 5. implement this-
uncheck launch image assets
, add iphone default splash screen images
hint
Comments
Post a Comment