Categories
Featured iPhone Development Resources

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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.