priore / AlertViewBlocks

UIAlertView using blocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AlertViewBlocks

Makes really easy to use AlertView without having a instance variable for iOS and tvOS.

How to use

    [AlertViewBlocks confirmWithTitle:@"Title" message:@"your message here" 
    confirm:^{
        
        NSLog(@"Ok button selected!");
        
    } cancel:^{
        
        NSLog(@"Cancel button selected!");

    }];
    [AlertViewBlocks confirmWithTitle:@"Title" message:@"your message here" 
    YesNo:YES confirm:^{
        
        NSLog(@"Yes button selected!");
        
    } cancel:^{
        
        NSLog(@"No button selected!");

    }];
    [AlertViewBlocks alertWithTitle:@"Title" message:@"you message here" confirm:^(NSInteger index) {

        NSLog(@"Button #%i selected!", index);
    
    } cancel:^{

        NSLog(@"Cancel button selected!");
    
    } otherButtonTitles:@"Button 1", @"Button 2", @"Button 3", nil];

About

UIAlertView using blocks

License:GNU General Public License v2.0


Languages

Language:Objective-C 95.4%Language:Ruby 4.6%