Skip to content

dral3x/BBAlertView

Repository files navigation

BBAlertView

BBAlertView is UIAlertView with blocks.

How to use it

It's super easy. First, create a new BBAlertView object

BBAlertView * alerView = [BBAlertView alertWithTitle:@"Title goes here" 
											 message:@"and message here"];

Setup every button you want with a title and an action for it in a block (or just NULL)

[alerView setCancelButtonWithTitle:@"Cancel" onTapDo:^{
    
    NSLog(@"Cancel button was tapped");
    
}];

[alerView addButtonWithTitle:@"Other Button" onTapDo:^{
    
    NSLog(@"Other button was tapped");
    
}];

And finally show it

[alerView show];

That's it!

About

BBAlertView: Simple block based UIAlertView extension

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published