Skip to content

chinabrant/BRAlertView

Repository files navigation

BRAlertView

CI Status Version License Platform

Example

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

效果图

[BRTextAlertView showMessage:@"Tap outside can't dismiss" buttonTitles:@[@"Cancel"] configrationBlock:^BRTextConfigration * _Nullable{
    BRTextConfigration *configration = [BRTextConfigration new];
    configration.tapOutsideDismiss = NO;
    return configration;
} actionBlock:^(int index) {

}];

[BRTextAlertView showMessage:@"Tap outside dismiss" buttonTitles:@[@"Cancel", @"Confirm"] configrationBlock:^BRTextConfigration * _Nullable{
    BRTextConfigration *configration = [BRTextConfigration new];
    NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:@"This is an AttributedString,Configration contain attributedString,the message parameter will invalid!"];
    [attrString addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(4, 16)];
    NSRange range = [[attrString string] rangeOfString:@"invalid"];
    [attrString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:17] range:range];
    [attrString addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:range];
    configration.attributedString = attrString;
                
    return configration;
} actionBlock:^(int index) {
                
}];

Requirements

iOS 7.0 or higher

Installation

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

pod "BRAlertView"

Author

brant, sjwu1234@gmail.com

License

BRAlertView is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published