有两个歌曲列表,在用户选择歌曲时播放:
nsmutablearray * enrique = [[NSMutableArray alloc]init];
[enrique addObject:@"add.mp3"];
[enrique addObject:@"hero.mp3"];
// this section of uitableview didselectrow
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
cell = [tableView cellForRowAtIndexPath:indexPath];
cellText = cell.textLabel.text;
lbl.text=cellText;
player=[passarray objectAtIndex:indexPath.row];
NSLog(@"mp3 %@",player);
// [passarray indexOfObject:player];
[self.player prepareToPlay];
// [player play];
}