You do not have to do any work with View while it is not on the screen, because it is simply a waste of iPhone resources. In addition, your application may receive a memory warning, and the view will be unloaded. IMHO the best approach is to set up the graphics in -(void) viewWillAppear
and start the animation in -(void) viewDidAppear
.
PS In -(void) viewDidLoad
parameters of the view frame are still invalid, and if you try to use them, you may get something wrong.
source share