0
votes

I have a Default.png for my splash screen image at my iphone app. After the initialization of my app is finished i add a subview with the Default.png in order to create a fade out transition. It works but when the switch occurs between the Default.png and the uiimageview Default.png on the view, the uiimageview show up slightly down in comparison with the Default.png which is the splash screen image. I want the uiimageview to show up at the same place as the Default.png splash screen image. This is the code i use...

Any help appreciated...

newview=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];

splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];

splashView.image = [UIImage imageNamed:@"Default.png"];

[newview addSubview:splashView];

2

2 Answers

1
votes

its probably the status bar, so take the top 20 px off your image and display as CGRectMake(0, 0, 320, 460) and you should be fine.

Or hide the status bar, but personally I prefer to see the status bar.

0
votes

I suppose that this is because of the status bar, it happened to me, you can try

splashView.frame = CGRectMake(0, 20, 320, 480);

this works for me