4

我有这段代码可以让我显示通知。

NSUserNotification *notification = [[NSUserNotification alloc] init];
notification.title = [NSString stringWithFormat:@"%@ (%@)",titre, numero];
notification.informativeText = message;
notification.soundName = NSUserNotificationDefaultSoundName;
notification.responsePlaceholder = @"Reply";
notification.hasReplyButton = true;
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];

我看到那个文本,太大,被截断了。有可能防止这种情况吗?

我还添加了回复通知的功能。文本框仅显示一行。是否也可以增加区域的大小(高度)?

或者更好的是,可以增加通知的大小(高度)以适应更多文本或更大的文本框?

预先感谢您的帮助

4

0 回答 0