How to start and stop songs programmatically? [duplicate]
Possible Duplicate:
How to play a so开发者_开发问答ng from the itunes library in iphone
In my app,
I want to fetch songs from iPhone Library.
And want to play that song.
How do I fetch song?
And How to start and stop songs programmatically in my app?
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL URLWithString:recordFile] error:nil];
[player prepareToPlay];
[player play];
[player pause];
精彩评论