【发布时间】:2013-08-08 01:59:22
【问题描述】:
就像在 iOS 上使用 UIAlertView。在 macOS 上创建弹出消息应该有类似的解决方案。试图搜索,但找不到任何有用的东西。
【问题讨论】:
就像在 iOS 上使用 UIAlertView。在 macOS 上创建弹出消息应该有类似的解决方案。试图搜索,但找不到任何有用的东西。
【问题讨论】:
您要查找的课程是NSAlert。有关此类的信息可以在其class reference here 中找到。以下是它的用法示例:
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"Some awesome message text"];
[alert addButtonWithTitle:@"OK"];
[alert runModal];
【讨论】: