Reputation: 399
I want to make a splash screen that shows an UIImage view and a UIActivityIndictor then after the application has finished loading, it fades into a new view, I have no idea how to make one view "fade" (as in dissolve) into another view and I'm not sure how to "pause" the code until it finishes loading the background parts, any help? Thanks so much!
Upvotes: 0
Views: 118
Reputation: 73588
So the below code shows a splash screen for 1 second, then it animates dissolving of the screen.
[UIView beginAnimations: @"Fade Out" context:nil];
// wait for time before begin, your splash screen shows for 1 second
[UIView setAnimationDelay:1.0];
// duration of animation, the splash screen dissolved in quarter of a second.
[UIView setAnimationDuration:0.25];
viewToDissolve.alpha = 0.0;
[UIView commitAnimations];
//animation complete, now show the main screen. you can use uinavigationviewcontroller or other methods.
Upvotes: 1
Reputation: 882
Go to project properties, select targets and Drag and drop your image to the Launch image section.
Upvotes: 0