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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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