更新时间:2022-12-27 10:37:33
使用 UILocalNotification
当您的应用在后台时.
Use a UILocalNotification
when your app is in the background.
UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.alertBody = @"Your message";
notification.alertAction = @"Open app";
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];