Skip to content

wusuowei/WTAlert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WTAlert

CI Status Version License Platform

Usage

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

Installation

CocoaPods

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

pod "WTAlert"

Carthage

  1. Add MBProgressHUD to your Cartfile. e.g., github "wusuowei/WTAlert" ~> 0.1.1
  2. Run carthage update
  3. Follow the rest of the standard Carthage installation instructions to add MBProgressHUD to your project.

##show alert

[WTAlert showAlertFrom:self title:@"This is normal title" message:@"This is normal message" cancelButtonTitle:@"cancel" cancle:^{
    NSLog(@"I clicked normal cancel button");
} confirmButtonTitle:@"confirm" confirm:^{
    NSLog(@"I clicked normal confirm button");
}];

or

__weak typeof(self) weakSelf = self;
[WTAlert showAlertWithBuilder:^(WTAlertBuilder * _Nonnull builder) {
    builder.viewController = weakSelf;
    builder.title = @"This is builder title";
    builder.message = @"This is builer message";
    builder.cancelTitle = @"cancel";
    builder.cancelBlock = ^(){
        NSLog(@"I clicked builder cancel button");
    };
    builder.confirmTitle = @"confirm";
    builder.confirmBlock = ^(){
        NSLog(@"I clicked builder confirm button");
    };
}];

Author

wentianen, 1206860151@qq.com

License

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

About

class method to show alert.

Resources

License

Stars

Watchers

Forks

Packages

No packages published