我想在我的 iPhone 应用程序中添加提醒功能,我知道我需要使用本地通知但我不想使用它。
那么有什么办法可以满足我的需求吗??
最佳答案
UILocalNotification 是个好东西,但如果您不想使用它,您可以使用 EventKit 来访问设备的提醒。
创建具有提醒类型的 EventStore 对象。
EKEventStore *store = [[EKEventStore alloc] initWithAccessToEntityTypes:EKEntityMaskReminder];
从用户处获取访问权限。
[store requestAccessToEntityType:EKEntityTypeReminder completion:^(BOOL granted, NSError *error) {
// handle access here }];
使用此功能创建提醒
+ (EKReminder *)reminderWithEventStore:(EKEventStore *)eventStore
关于iphone - 想在 iphone 应用程序中添加提醒,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19093896/