如何从带有回复字段的通知中获取输入。我在文档中没有找到任何东西
这是我当前的代码,我需要什么才能得到用户的响应?
#import "AppDelegate.h"
@implementation AppDelegate
@synthesize nTitle;
@synthesize nMessage;
- (IBAction)showNotification:(id)sender{
NSUserNotification *notification = [[NSUserNotification alloc] init];
notification.title = [nTitle stringValue];
notification.informativeText = [nMessage stringValue];
notification.soundName = NSUserNotificationDefaultSoundName;
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
[[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self];
}
- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification{
return YES;
}
@end
我在哪里可以找到通知中心的更多最新信息和文档?