CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ | 
| LangLanguage | Obj-CObjective C | 
| License | MIT | 
| ReleasedLast Release | May 2017 | 
Maintained by DeceptionAlertViews.
Provide the following line in any classes that will be presenting a type of alertview ->
#import <DeceptionAlertViews/AlertView.h>The method you will use for showing a UIAlertView/UIAlertController will be :
+ (void)showAlertWithTitle:(NSString *)title  
                message:(NSString *)message  
            cancelBlock:(AlertCancelBlock)alertCancelBlock  
        completionBlocks:(NSArray *)completionBlocks  
        cancelButtonTitle:(NSString *)cancelButtonTitle  
        otherButtonTitles:(NSArray *)otherButtonTitles  
    presentingViewController:(UIViewController *)presentingViewController
                type:(UIAlertControllerStyle)type
            animated:(BOOL)animated  
        completionBlock:(AlertCompletionBlock)alertCompletionBlock;  To return an UIAlertView/UIAlertController use the following :
+ (void)returnAlertWithTitle:(NSString *)title  
                message:(NSString *)message  
            cancelBlock:(AlertCancelBlock)alertCancelBlock  
        completionBlocks:(NSArray *)completionBlocks  
        cancelButtonTitle:(NSString *)cancelButtonTitle  
        otherButtonTitles:(NSArray *)otherButtonTitles  
    presentingViewController:(UIViewController *)presentingViewController  
                type:(UIAlertControllerStyle)type
            animated:(BOOL)animated  
        completionBlock:(AlertCompletionBlock)alertCompletionBlock;  Note : the alertCancelBlock is an actual block or ^{} that you will provide as the parameter and completionBlocks is an array of blocks you will pass in with the index corresponding the index of the button in the otherButtonTitles array.
An example implementation :  
[AlertView returnAlertWithTitle:@"A Title" message:@"A Message" cancelBlock:^{  
    NSLog(@"cancel block called");  
} completionBlocks:@[^{  
    NSLog(@"block one called"); 
},^{  
    NSLog(@"block two called");  
},^{  
    NSLog(@"block three called");  
}] cancelButtonTitle:@"cancel" otherButtonTitles:@[@"one", @"two", @"three"] presentingViewController:self animated:YES completionBlock:^{  
    NSLog(@"completion block called");  
}];  This is designed to be used with apps that support iOS 4.3 thru iOS 8. Please use the latest commit (preferred) or latest version. It is back supported to iOS 4.3 but the class uses arc and currently does not support non-arc apps.
DeceptionAlertViews is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DeceptionAlertViews', '~> 0.6.0'
Anonymous, [email protected]
DeceptionAlertViews is available under the MIT license. See the LICENSE file for more info.