Latest | 1.0.0 |
---|---|
Homepage | https://github.com/liuhaoliang/HLAlert |
License | MIT |
Platforms | ios 8.0, requires ARC |
Frameworks | UIKit |
Authors |
Introduction
An easy way to use AlertView and ActionSheet in your Object-C or Swift project,this library are based on UIAlertViewController.
]
Usage:
- add the repo in your podfile
- use pod ‘HLAlert’ or drag the library into your project folder
-
Use Object-C
-
-
import the header
#import <HLAlert/HLAlert-Swift.h>
- write the method
[HLAlert showAlertWithTitle:@"title" message:@"message" actionTitles:@[@"action1",@"action2"] handler:^(NSInteger idx) { //do something }];
-
Use Swift
-
- import the header
import HLAlert
- write the method
HLAlert.showAlert(title: "title", message: "message", actionTitles: ["action1","action2"]) { (idx) in // do something }
Latest podspec
{ "name": "HLAlert", "version": "1.0.0", "summary": "An easy way to use UIAlertView and UIActionSheet.", "description": "u7b80u5355u65b9u4fbfu5730u4f7fu7528UIAlertViewControlleru6784u5efaAlertViewu548cActionSheet", "homepage": "https://github.com/liuhaoliang/HLAlert", "license": "MIT", "authors": { "lhl": "[email protected]" }, "platforms": { "ios": "8.0" }, "source": { "git": "https://github.com/liuhaoliang/HLAlert.git", "tag": "1.0.0" }, "source_files": [ "HLAlert", "HLAlert/*.{swift}" ], "frameworks": "UIKit", "requires_arc": true }
Tue, 22 May 2018 12:40:20 +0000