NSAlert, Yes, No

October 18, 2012   ·   0 Comments

Screen Shot 2012-10-19 at 7.42.45 AM

-(void)Fun_alert_yes_no{
    NSAlert *theAlert = [[[NSAlert alloc] init] autorelease];
    [theAlert addButtonWithTitle:@"Install"];
    [theAlert addButtonWithTitle:@"Don't Install"];
    [theAlert setMessageText:@"Powenko APP is not installed"];
    [theAlert setInformativeText:@"ImageMagick is used to convert pnm images so you can edit them with photoshop"];
    [theAlert setAlertStyle:0];
    [theAlert setIcon:[NSImage imageNamed:@"ImageMagick"]];
    int rCode = [theAlert runModal];
    if (rCode == NSAlertFirstButtonReturn) {
        NSLog(@"Install");
    } else if (rCode == NSAlertSecondButtonReturn) {
        NSLog(@"Don't Install");
    } else {
        NSLog(@"other");
    }
}



shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
MAC139

MAC

Amazon

adsbygoogle

Recent Posts

Categories

Amazon