RT 求大神的解答
步骤应该先从iTunes里面导出音乐到APP里面
然后使用的是本地推送
网易云音乐里面的音乐闹钟就实现了这个需求
我现在做到了把iTunes里面的音乐导入到APP中 现在就是不知道如何设置这个音乐为本地推送的声音
http://stackoverflow.com/questions/6894026/how-to-set-sound-local-notification-from-song-in-itunes
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section == 0) {
MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeMusic];
picker.delegate = self;
picker.allowsPickingMultipleItems = NO;
picker.prompt = NSLocalizedString (@"Select any song from the list", @"Prompt to user to choose some songs to play");
//[self presentModalViewController: picker animated: YES];
[self.navigationController pushViewController:picker animated:YES];
NSLog(@"gsudifghukdsf");
[picker release];
}
}
(void) mediaPicker: (MPMediaPickerController *) mediaPicker didPickMediaItems: (MPMediaItemCollection *) mediaItemCollection
{
[self.navigationController popToRootViewControllerAnimated:YES];
//[self dismissModalViewControllerAnimated: YES];
NSLog(@"%@",mediaItemCollection);
UILocalNotification *local = [[UILocalNotification alloc] init];
//selectedSongCollection=mediaItemCollection;
}
求解答!!!!!!!!!!!!