Latest 2.1.0
Homepage https://github.com/dudongdaoqi/LCAlertView
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

ios6.0+

Installation

LCAlertView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "LCAlertView"

LCAlertview like the system alertview

  1. uses for iphone and ipad
  2. it can rotate with the screen
  3. like the system alertview, use easy
  4. you can use block style in 2.0
  5. three kinds of animation mode:Default/FlipHorizontal/FlipVertical

This alert provides a alertview like system using ARC model.

Release

1.0 ios4.3 MRC

2.0 ios5.0 ARC

2.1 ios5.0 cocopods

How To Use


#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);
}

Using blocks


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];

Animation Mode


typedef NS_ENUM(NSInteger, LCAlertAnimation) {
LCAlertAnimationDefault = 0,
LCAlertAnimationFlipHorizontal,
LCAlertAnimationFlipVertical,
};

alert.alertAnimationStyle = LCAlertAnimationFlipHorizontal;

Alert Image


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];

Latest podspec

{
    "name": "LCAlertView",
    "version": "2.1.0",
    "summary": "LCAlertView like syetem",
    "description": "                       AlertView like system a ha!n",
    "homepage": "https://github.com/dudongdaoqi/LCAlertView",
    "license": "MIT",
    "authors": {
        "xulicheng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dudongdaoqi/LCAlertView.git",
        "tag": "2.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/LCAlertView/*",
    "public_header_files": "Pod/Classes/LCAlertView/*.h"
}

Pin It on Pinterest

Share This