Skip to content
class method to show alert.
Objective-C Shell Swift Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
Pod
.gitignore
.travis.yml
LICENSE
README.md
WTAlert.framework.zip
WTAlert.podspec
_Pods.xcodeproj

README.md

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.

You can’t perform that action at this time.