我通过以下方式创建NSUSerNotification
:
NSUserNotification *notification = [[NSUserNotification alloc] init];
[notification setTitle:notificationTitle];
[notification setInformativeText:_informativeText];
[notification setSoundName:NSUserNotificationDefaultSoundName];
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
我希望通知显示的时间超过几秒钟 如何自定义通知在屏幕上显示的持续时间?