1
버튼 동작에 대해 매주 알림을 설정하는 방법. 매주 응용 프로그램에 매주버튼 클릭시 매주 로컬 알림.
-(IBAction)buttonAction:(id)sender{
UILocalNotification* localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = [NSDate dateByAddingTimeInterval:60*60*24*7];
localNotification.alertBody = @"Hello Message";
localNotification.alertAction = @"Show me the item";
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
localNotification.repeatInterval = NSWeekCalendarUnit;
}
에
는 // 알림 메시지에 "Hello 메시지"