Custom iOS7 UIAlertView

I forked « ios-custom-alertview » from @wimagguc  and added a different design button this week.

You can just grab the open source code from Github now .

Ios Custom AlertView

Implementation of this alert view is :

OBJECTIVE-C
CustomIOS7AlertView *alertView = [CustomIOS7AlertView alertWithTitle:@“Thank you for trying this demo” message:@“If you liked what you saw,\nand are interesting in seeing\nwhat we can do together,\nplease shoot us a mail by tapping the button below.”];
[alertView setButtonTitles:[NSMutableArray arrayWithObjects:@“Shoot us a mail!”, @“Try another demo!”, @“Close”, nil]];
[alertView setButtonColors:[NSMutableArray arrayWithObjects:[UIColor colorWithRed:255.0f/255.0f green:77.0f/255.0f blue:94.0f/255.0f alpha:1.0f],[UIColor colorWithRed:0.0f green:0.5f blue:1.0f alpha:1.0f],nil]];
[alertView setDelegate:self];
[alertView setOnButtonTouchUpInside:^(CustomIOS7AlertView *alertView, int buttonIndex) {
NSLog(@“Block: Button at position %d is clicked on alertView %d.”, buttonIndex, [alertView tag]);
[alertView close];
}];
[alertView show];
Click to expand and view more

More…

Quentin Rousseau

Quentin Rousseau

CTO & Co-founder at Rootly (YC S21)

San Francisco, CA

Former Instacart SRE. Rock climber & wine enthusiast.

Start searching

Enter keywords to search articles

↑↓
↵
ESC
⌘K Shortcut