UIUserNotificationSettings
2019-03-05 本文已影响0人
风冰武
//该对象封装通知类型 44行
备注:该对象在iOS8引入, 在iOS10被废弃, 使用UNNotificationSettings代替
@interface UIUserNotificationSettings : NSObject
//创建并返回一个settings对象, 使用该对象注册所请求的通知和操作类型 47行
//参数1: 通知类型
//参数2: 一组UIUserNotificationCategory对象, 用于定义通知可能包含的操作组
//返回: 用户通知设置对象, 可以注册到UIApplication对象
+ (instancetype)settingsForTypes:(UIUserNotificationType)types
categories:(nullable NSSet<UIUserNotificationCategory *> *)categories;
//应用程序允许的通知类型(只读) 50行
@property (nonatomic, readonly) UIUserNotificationType types;