如何创建本地通知ios

如何创建本地通知ios,ios,uilocalnotification,Ios,Uilocalnotification,我没有收到本地通知,谁能告诉我如何获得本地通知。localNotification.fireDate=[nsdatedatewithtimeintervalsincenow:60] 试试这个 localNotification.fireDate=[nsdatedatewithtimeintervalsincenow:60] 试试这个 localNotification.fireDate=[nsdatedatewithtimeintervalsincenow:60] 试试这个 localNotif

我没有收到本地通知,谁能告诉我如何获得本地通知。

localNotification.fireDate=[nsdatedatewithtimeintervalsincenow:60]


试试这个

localNotification.fireDate=[nsdatedatewithtimeintervalsincenow:60]


试试这个

localNotification.fireDate=[nsdatedatewithtimeintervalsincenow:60]


试试这个

localNotification.fireDate=[nsdatedatewithtimeintervalsincenow:60]


试试这个

您需要指定触发通知的时间。您刚刚创建了通知,但没有设置何时需要触发通知

例如


localNotif.fireDate=[itemDate-Date-ByAddingTimeIntervalInterval:-(分钟数*60)]

您需要指定触发通知的时间。您刚刚创建了通知,但没有设置何时需要触发通知

例如


localNotif.fireDate=[itemDate-Date-ByAddingTimeIntervalInterval:-(分钟数*60)]

您需要指定触发通知的时间。您刚刚创建了通知,但没有设置何时需要触发通知

例如


localNotif.fireDate=[itemDate-Date-ByAddingTimeIntervalInterval:-(分钟数*60)]

您需要指定触发通知的时间。您刚刚创建了通知,但没有设置何时需要触发通知

例如


localNotif.fireDate=[itemDate-Date-ByAddingTimeIntervalInterval:-(分钟数*60)]

如果应用程序处于前台阶段,则您不会看到这些通知。您必须在委托方法上编写代码

    UILocalNotification* localNotification = [[UILocalNotificationalloc] init]; 
localNotification.alertBody = @"Your alert message";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];

若应用程序处于前台阶段,那个么您将看不到这些通知。您必须在委托方法上编写代码

    UILocalNotification* localNotification = [[UILocalNotificationalloc] init]; 
localNotification.alertBody = @"Your alert message";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];

若应用程序处于前台阶段,那个么您将看不到这些通知。您必须在委托方法上编写代码

    UILocalNotification* localNotification = [[UILocalNotificationalloc] init]; 
localNotification.alertBody = @"Your alert message";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];

若应用程序处于前台阶段,那个么您将看不到这些通知。您必须在委托方法上编写代码

    UILocalNotification* localNotification = [[UILocalNotificationalloc] init]; 
localNotification.alertBody = @"Your alert message";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];