質問

Hi Am creating iOS app with custom splash screen, the custom splash screen gets loaded after the iOS's default splash screen with some loading progress. i did set the default image as the background for my custom splash screen, but the custom splash screen image got reduced size at the top and bottom, please take a look at the screen shots,and please get out from this

thanks in advance.

Ios's default screen

enter image description here

my custom splash screen

enter image description here

役に立ちましたか?

解決 2

Thank you all, Thanks a lot.

Finally I found a trick,

First you should hide the Status Bar during launch. By just doing this Xcode -> project Targets -> summary Tab -> Status Bar -> check the visibility.

Then, set

[imgsplash setImage:[UIImage imageNamed:@"Default"]];

imgsplash.frame = CGRectMake([[UIScreen mainScreen] bounds].origin.x,
                             [[UIScreen mainScreen] bounds].origin.y,
                             [[UIScreen mainScreen] bounds].size.width,
                             [[UIScreen mainScreen] bounds].size.height);

imgsplash.autoresizingMask =  UIViewAutoresizingFlexibleBottomMargin |  
                              UIViewAutoresizingFlexibleTopMargin | 
                              UIViewAutoresizingFlexibleLeftMargin |
                              UIViewAutoresizingFlexibleRightMargin;

by giving [UIImage imageNamed:@"Default"] let the imageNamed can choose right image.

Thanks.

他のヒント

Try explicitly detecting screen size and using a specific resource for a 4-inch screen.

if ([[UIScreen mainScreen] bounds].size.height == 568) {
    // Present an image formatted for iPhone 5
}
else {
    // Present an image formatted for a 3.5" iPhone
}

Per the top answer here, iOS doesn't appear to respect resources with -568h@2x attached to them other than the actual launch image.

Edit:
It appears from the repeated image at the bottom that you might be doing [UIColor colorWithPatternImage:]. With the method above, use [UIImage imageNamed:].

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top