我正在开发一个应用程序。这将有交互式通知。如果应用程序得到推送通知和应用程序没有在前台运行,那么用户应该能够通过通知中心的通知回复。我想添加文本字段来获取文本从用户和回复按钮发送文本到应用程序。
知道该怎么做吗?我能够通过uimutablenotifationaction类添加按钮。
适用于Xcode6 GM和iOS8 GM版本。没有选项添加文本字段到交互式**通知。
NS_CLASS_AVAILABLE_IOS(8_0)
@interface UIMutableUserNotificationAction : UIUserNotificationAction
// The unique identifier for this action.
@property (nonatomic, copy) NSString *identifier;
// The localized title to display for this action.
@property (nonatomic, copy) NSString *title;
// How the application should be activated in response to the action.
@property (nonatomic, assign) UIUserNotificationActivationMode activationMode;
// Whether this action is secure and should require unlocking before being performed. If the activation mode is UIUserNotificationActivationModeForeground, then the action is considered secure and this property is ignored.
@property (nonatomic, assign, getter=isAuthenticationRequired) BOOL authenticationRequired;
// Whether this action should be indicated as destructive when displayed.
@property (nonatomic, assign, getter=isDestructive) BOOL destructive;
@end
详情请参阅以下连结:
UIMutableUserNotificationAction