返信フィールドを使用して通知から入力を取得するにはどうすればよいですか。ドキュメントには何も見つかりませんでした
これが私の現在のコードです。ユーザーからの応答を得るには何が必要ですか?
#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
通知センターの最新情報とドキュメントはどこで入手できますか?