0

I'm trying to have the audio file play as soon as the view controller is loaded instead of manually hitting a button. Any suggestions?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Austinj
  • 43
  • 2
  • 8

1 Answers1

1

The UIViewController has a method/function called viewDidLoad which executes when the UIViewController is loaded for the first time. If you want it to play each time it is shown, then you can use viewDidAppear

Documentation for this class is at: http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIViewController_Class/Reference/Reference.html

Taylor Dondich
  • 628
  • 4
  • 9