i want to select songs from ipod Library and play it using avplayer i want the music to continue playing even after the app goes to background i am new to iOS programming can anyone help me out ..
Thanks
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.
To allow the user to pick a song (or songs) from their music library, use the
MPMediaPickerControllerclass.Change
self.navigationItem.rightBarButtonItemif you’re not showing it from a button on the right side of title bar.Then you need to listen for the result by implementing the delegate:
Called when the user cancelled the selection:
Called when the user chose something:
You’ll need a
UIPopoverController* popover;in your class .h file. Also you should retainmyPlayersomewhere…To allow music to continue in the background, add an
audiostring to the array in your Info.plist under theUIBackgroundModeskey.