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:
Here’s an example from the readme showing how you can display the alert view, and how to use blocks for customization and callbacks:
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.
Original article: Easily Customizable UIAlertView Replacement With Support For A Blocks-Based Syntax
©2012 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.
Source : blancer[dot]com
The equivalent on Android would be the Android AlertDialog.
ReplyDeleteWe just released: PortKit: UX Metaphor Equivalents for iOS & Android
http://kintek.com.au/blog/portkit-ux-metaphor-equivalents-for-ios-and-android/
It has side by side comparisons of the native ui widgets and links to downloadable PSDs for designing.