An easy way to use AlertView and ActionSheet in your Object-C or Swift project,this library are based on UIAlertViewController.
- add the repo in your podfile
- use pod 'HLAlert' or drag the library into your project folder
- import the header
#import <HLAlert/HLAlert-Swift.h>
- write the method
[HLAlert showAlertWithTitle:@"title" message:@"message" actionTitles:@[@"action1",@"action2"] handler:^(NSInteger idx) {
//do something
}];
- import the header
import HLAlert
- write the method
HLAlert.showAlert(title: "title", message: "message", actionTitles: ["action1","action2"]) { (idx) in
// do something
}