ios - Can't make UIUserNotificationActionBehaviorTextInput work -
uimutableusernotificationaction *answer; answer = [[uimutableusernotificationaction alloc] init]; [answer setactivationmode:uiusernotificationactivationmodebackground]; [answer settitle:@"answer"]; [answer setidentifier:@"answer"]; [answer setdestructive:no]; [answer setauthenticationrequired:no]; [answer setbehavior:uiusernotificationactionbehaviortextinput]; uimutableusernotificationcategory *actioncategory; actioncategory = [[uimutableusernotificationcategory alloc] init]; [actioncategory setidentifier:notificationcategoryident]; [actioncategory setactions:@[answer] forcontext:uiusernotificationactioncontextdefault]; nsset *categories = [nsset setwithobject:actioncategory]; uiusernotificationtype types = (uiusernotificationtypealert| uiusernotificationtypesound| uiusernotificationtypebadge); uiusernotificationsettings *settings; settings = [uiusernotificationsettings settingsfortypes:types categories:categories]; [[uiapplication sharedapplication] registerusernotificationsettings:settings];
this how set "reply" action. can see, specified desired behavior. however, when receive notification, pull down , see "answer" button. what's problem? textfield?
Comments
Post a Comment