0
AppDelegate의 applicationDidEnterBackground 함수에서 로컬 알림을 만드는 방법을 알고 있습니다.사용자 지정 로컬 사용자 알림 설정
- (void)applicationDidEnterBackground:(UIApplication *)application
{
UILocalNotification * uln = [[UILocalNotification alloc] init];
uln.fireDate = [NSDate dateWithTimeIntervalSinceNow:10];
uln.timeZone = [NSTimeZone defaultTimeZone];
uln.alertBody = @"Did you forget something?";
uln.alertAction = @"Show me";
uln.soundName = UILocalNotificationDefaultSoundName;
//uln.applicationIconBadgeNumber = 0;
uln.repeatInterval = NSMinuteCalendarUnit;
application.scheduledLocalNotifications = [NSArray arrayWithObject:uln];
}
그러나 가능한 사용자가 fireDate의 시간을 설정할 수 있으며, 늦게 자정처럼 시간을 방해하지 않는 것이 무엇입니까?
고마워요! 하지만 간단한 질문을해도 될까요? 나는 사용자가 viewController에서 시간을 설정해야한다고 생각한다. AppDelegate 파일에서이 값을 어떻게 사용할 수 있습니까? 나는 초보자입니다 ... – lancellx
코코아 프로그래밍에 익숙하지 않다면이 튜토리얼을 시작하는 것이 좋습니다. http://developer.apple.com/library/ios/documentation/iphone/conceptual/iphone101/Articles/00_Introduction.html 애플에 의해. –
고맙습니다. 벌써 만들었습니다. – lancellx