Get Updates By E-mail 

Article Written By:
Johann Dowa

Easily Customizable UIAlertView Replacement With Support For A Blocks-Based Syntax

  •  
  •  
  •  
  •  
  •  

I’ve mentioned a number of UIAlertView replacements, and being able to use a blocks based syntax for callbacks can make your code much cleaner.

Here’s a project from Michael Zaborowski that allows for easy customization (multiple customizations can be done within blocks), supporting blocks based callbacks or delegates.

You can choose from a number of preset styles for customization, and also change the title styling and the colors of individual elements if desired all using the typical alert view style.

Here are some images from the readme showing different customizations:

WCAlertView

Here’s an example from the readme showing how you can display the alert view, and how to use blocks for customization and callbacks:

[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];

You can find WCAlertView on Github here.

A nice UIAlertView replacement for those looking for custom coloring and a cleaner syntax.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments