Custom iOS7 UIAlertView

| Comments

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 :

1
2
3
4
5
6
7
8
9
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];

More…