Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 2.49 KB

File metadata and controls

62 lines (40 loc) · 2.49 KB

WCAlertView

WCAlertView is a subclass from UIAlertView with possibility of customization.

You can easly custom your UIAlertView.

How To Use

There is couple of predefined styles, you can use them, or write you own styles.

WCAlertView support blocks.

You can also set deafault appearance for all alert views:

[WCAlertView setDefaultStyle:WCAlertViewStyleWhite];

You can use

[WCAlertView showAlertWithTitle:@"Custom AlertView Title" 
					    message:@"You can do a lot of additional setup using WCAlertView." 
					    customizationBlock:^(WCAlertView *alertView) {
					    
        					alertView.style = WCAlertViewStyleVioletHatched;
        					
    } completionBlock:^(NSUInteger buttonIndex, WCAlertView *alertView) {
        
    } cancelButtonTitle:@"Cancel" otherButtonTitles:@"Okay",nil];
WCAlertView *alert = [[WCAlertView alloc] initWithTitle:@"Custom AlertView Title" 
												message:@"You can do a lot of additional setup using WCAlertView." 
											   delegate:nil cancelButtonTitle:@"Cancel" 
											   otherButtonTitles:@"Okay", nil];
											   
    alert.style = WCAlertViewStyleVioletHatched;
    
    [alert show];

Credits

Inspired by Aaron Crabtree - UIAlertView Custom Graphics , borrowing some general approaches in drawing Alert View. Simple block extension got from wannabegeek.

Contact

Michal Zaborowski