Home

Awesome

Logo RAlertView

AlertView A pop-up framework, Can be simple and convenient to join your project.

Shippable CocoaPods Packagist email doc

Warning content

Warning content

Installation

CocoaPods

pod 'RAlertView'

Preview AlertStyle

typedef NS_ENUM(NSInteger,AlertStyle) {
    SimpleAlert = 0,
    ConfirmAlert,
    CancelAndConfirmAlert,
};

RAlertView Preview

Preview AlertTheme

   RAlertView *alert = [[RAlertView alloc] initWithStyle:CancelAndConfirmAlert];
   alert.theme =[UIColor redColor];

RAlertView Preview

Some feature set

alert.isClickBackgroundCloseWindow = YES;
alert.contentTextLabel.text =@"SimpleAlert \nAlertView A pop-up framework, Can be simple and convenient to join your project";

alert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@"AlertView A pop-up framework, Can be simple and convenient to join your project" lineSpacing:5];

init RAlertView

RAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert];
RAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert width:0.8];

SimpleAlert

RAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert width:0.8];
alert.isClickBackgroundCloseWindow = YES;
alert.contentTextLabel.text =@"SimpleAlert \nAlertView A pop-up framework, Can be simple and convenient to join your project";

ConfirmAlert

RAlertView *alert = [[RAlertView alloc] initWithStyle:ConfirmAlert];
alert.headerTitleLabel.text = @"ConfirmAlert";
alert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@"AlertView A pop-up framework, Can be simple and convenient to join your project" lineSpacing:5];
[alert.confirmButton setTitle:@"Ok" forState:UIControlStateNormal];
alert.confirm = ^(){
        NSLog(@"Click on the Ok");
   };

CancelAndConfirmAlert

RAlertView *alert = [[RAlertView alloc] initWithStyle:CancelAndConfirmAlert];
alert.headerTitleLabel.text = @"CancelAndConfirmAlert";
alert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@"AlertView A pop-up framework, Can be simple and convenient to join your project" lineSpacing:5];;
[alert.confirmButton setTitle:@"Ok" forState:UIControlStateNormal];
[alert.cancelButton setTitle:@"Cancel" forState:UIControlStateNormal];
alert.confirm = ^(){
        NSLog(@"Click on the Ok");
   };
alert.cancel = ^(){
        NSLog(@"Click on the Cancel");
   };

TODO

期待

排版规范参考 https://github.com/sparanoid/chinese-copywriting-guidelines