To run the example project, clone the repo, and run pod install
from the Example directory first.
ios6.0+
LCAlertView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "LCAlertView"
LCAlertview like the system alertview
- uses for iphone and ipad
- it can rotate with the screen
- like the system alertview, use easy
- you can use block style in 2.0
- three kinds of animation mode:Default/FlipHorizontal/FlipVertical
This alert provides a alertview like system using ARC model.
1.0 ios4.3 MRC
2.0 ios5.0 ARC
2.1 ios5.0 cocopods
#import "LCAlertView.h"
LCAlertView *alert = [[LCAlertView alloc]initWithTitle:@"hello" message:@"are you ready" delegate:self cancelButtonTitle:@"cancle" otherButtonTitles:@"sure",nil];
[alert show];
#pragma mark delegate
- (void)alertView:(LCAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
NSLog(@"alert:%lu",buttonIndex);
}
LCAlertView *alert = [[LCAlertView alloc]initWithTitle:@"hello" message:@"are you ready" delegate:self cancelButtonTitle:@"cancle" otherButtonTitles:@"yes",nil];
alert.alertAction = ^(NSInteger buttonIndex){
NSLog(@"alert:%lu",buttonIndex);
};
[alert show];
typedef NS_ENUM(NSInteger, LCAlertAnimation) {
LCAlertAnimationDefault = 0,
LCAlertAnimationFlipHorizontal,
LCAlertAnimationFlipVertical,
};
alert.alertAnimationStyle = LCAlertAnimationFlipHorizontal;
LCAlertView *alert = [[LCAlertView alloc]initWithImage:@"watch_bind" closeImage:@"confirm_delete" delegate:self];
alert.imageAction = ^{
NSLog(@"image tap");
};
alert.alertAction = ^(NSInteger buttonIndex){
NSLog(@"close tap");
};
[alert show];