To run the example project, clone the repo, and run pod install
from the Example directory first.
WTAlert is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "WTAlert"
- Add MBProgressHUD to your Cartfile. e.g.,
github "wusuowei/WTAlert" ~> 0.1.1
- Run
carthage update
- 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");
};
}];
wentianen, 1206860151@qq.com
WTAlert is available under the MIT license. See the LICENSE file for more info.