问题描述
- iOS 如何使用iTunes里面的音乐作为本地推送的声音 在线等 急!!! 5C
- 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;
}
- (void) mediaPickerDidCancel: (MPMediaPickerController *) mediaPicker{
[self.navigationController popToRootViewControllerAnimated:YES];//[self dismissModalViewControllerAnimated: YES]; }
解决方案三:
求解答!!!!!!!!!!!!
时间: 2024-12-22 21:13:31