Doing a music player app! previous and next track
How can I make a app to iphone without using ipod library, and doing the next song and the previous song??
I think the best way is doing an array with the songs, but I don't know how to do. Someone can helps me??
My app is working, with pause, play, current time and volume slider... but this part of next song I really don't know!
Thanks a lot.
- (void)viewDidLoad {
//initialize string to the path of the song in the resource folder
NSString *myMusic = [[NSBundle mainBundle]pathForResource:@"gastando" ofType:@"mp3"];
player = [[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPath:myMusic] error:NULL];
player.numberOfLoops = 0;
player.volume = slider.value;
timeSlider.maximumValue = player.duration;
timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(timeLoader) userInfo:nil repeats:YES];
[super viewDidLoad];
}
|