An alert view that you can play with !
Inspired By TeehanLax's TLAlertView,CYAlertView is an alert view with basic UIKit Dynamic animations,and has similar usage as the UIAlertView in UIKit.
###How To Use ? To use CYAlertView,simply drag the "CYAlertView" folder into your project,import "CYAlertView.h",and you are ready to go !
Creating instance:
CYAlertView *alert = [[CYAlertView alloc]initWithTitle:@"Title"
message:@"Message"
withActions:@[]
tapToClose:NO];
[alert show];
if you pass nil or an empty array to the initilizer,the alert view will generate a default OK button,you can also add your custom callbacks using CYAlertAction,then add it into the array that you are passing to the initializer.
CYAlertAction *cancelAction = [[CYAlertAction alloc]initWithTitle:@"Cancel"
withActionType:ActionTypeDestructive
handler:^(CYAlertAction *action){
NSLog(@"Cancel");
}];
CYAlertView *alert = [[CYAlertView alloc]initWithTitle:@"Title"
message:@"Message"
withActions:@[cancelAction]
tapToClose:NO];
[alert show];
For more details,please download the sample project.