开发者

Cocoa Touch - Dialogue boxes?

开发者 https://www.devze.com 2023-01-06 17:13 出处:网络
How can i get a plain basic dialogue box in cocoa touch.se开发者_运维知识库ems so simple but I can figure it out...

How can i get a plain basic dialogue box in cocoa touch.se开发者_运维知识库ems so simple but I can figure it out...

Thanks!


You want the UIAlertView class. For example:

UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"Something happened" 
     message:@"And here is some more information about what it is."
          delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[myAlert show];
[myAlert release];


Create an NS Window using the Interface Builder. In your appdelegate, open the window.


Another option is CFUserNotification. The advantage to UIAlertView is that it does not require you to link against UIKit.

0

精彩评论

暂无评论...
验证码 换一张
取 消