[英]Pop-up message on macOS programming
喜歡在iOS上使用UIAlertView。 在macOS上創建彈出消息應該有類似的解決方案。 試圖搜索但找不到任何有用的東西。
您正在尋找的課程是NSAlert
。 關於這個類的信息可以在這里的類引用中找到 。 以下是其用法示例:
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"Some awesome message text"];
[alert addButtonWithTitle:@"OK"];
[alert runModal];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.