title: How to play an opening animation when iOS app launches
body: <p>I am trying to get the code correct to play an opening animation on my iphone app I created in xcode. I want it to only play when the app launches (like angry birds) not every time I go back to the main page. I have tried several things and nothing seems to be working correctly. Can someone tell me how to correctly do this? </p>
  
  <p>I am using a series of images to create the animation.</p>
  
  <p>I have tried to put the animation code from geeky lemon tutorial (<a href="http://www.youtube.com/watch?v=5AbdZ-8JBZQ" rel="nofollow">http://www.youtube.com/watch?v=5AbdZ-8JBZQ</a>) in the viewDidLoad. This does work and play the animation but every time I go back to the main page the animation plays. I don't want the animation to play when go back to the main page, just when the app starts.</p>
  
  <p>I have also tried to add another view that is the first view when the app launches and have the animation play in viewDidLoad there and then with perform selector go to the main page after the animation is complete (done with the after Delay part). This also works and does play the animation and does not play when I go back to the main screen BUT this is causing some error making the app crash. I have put NSLogs in the viewDidLoad sections so I can see the pages are working and sometimes when I am in the app playing it says that my opening animation viewDidLoad is being called. So I think this has something to do with the crashing. When I take out this view and go directly to the main view it doesn't crash. </p>
  
  <p>I have tried to put it in the app delegate also and I can't get that to work at all. </p>
  
  <p>Please help this is driving me crazy I can't figure out what is going wrong. I know it can work angry birds and others do this very successfully. </p>
  
  <p>If there is a better method?</p>