알람 앱을 만들려고 시도하지만 iTunes에서 노래를 로컬 알림 소리로 설정하는 방법을 모르겠습니다.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];
}
아이튠즈
뭔가를 호출하는이 코드를 사용UILocalNotification *localNotif = [[UILocalNotification alloc] init];
if (localNotif == nil)
{ //NSLog(@"Get in if localNotif");
return;
}
localNotif.fireDate = DateAlarm;
localNotif.timeZone = [NSTimeZone defaultTimeZone];
// Notification details
localNotif.alertBody = [NSString stringWithFormat:@"%@",DateAlarm];
// Set the action button
localNotif.alertAction = @"Oh Shit";
localNotif.soundName = UILocalNotificationDefaultSoundName;
그래서 지역의 소리에 노래를 설정하는 방법 나를 인도 해주십시오?
안내해주세요. 아니면 할 수 없어 ?? – crazyoxygen
이 URL로 확인하십시오. http://www.techotopia.com/index.php/Scheduling_iOS_4_iPhone_Local_Notifications#Adding_a_Sound_File_to_the_Project –