MessageBox в Cocoa приложении

on May 13th, 2012 by Hades | No Comments »

Для того чтобы отобразить аналог API Windows – ShowMessageBox в cocoa приложении можно сделать так:
[cc lang=”objc” width=”550″]
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert setMessageText:@”Hi people!”];
[alert addButtonWithTitle:@”First”];
[alert addButtonWithTitle:@”Second”];
[alert runModal];
[/cc]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.