HLAlert 1.0.0

HLAlert 1.0.0

1234qwer 维护。



HLAlert 1.0.0

  • lhl

简介

在 Objective-C 或 Swift 项目中使用 AlertView 和 ActionSheet 的简单方法,此库基于 UIAlertViewViewController。

demo.gif]

用法

  1. 在 podfile 中添加仓库
  2. 使用 pod 'HLAlert' 或将库拖入您的项目文件夹
  • 使用 Objective-C

  1. 导入头文件
#import <HLAlert/HLAlert-Swift.h>
  1. 编写方法
[HLAlert showAlertWithTitle:@"title" message:@"message" actionTitles:@[@"action1",@"action2"] handler:^(NSInteger idx) {
        //do something
    }];
  • 使用 Swift

  1. 导入头文件
import HLAlert
  1. 编写方法
HLAlert.showAlert(title: "title", message: "message", actionTitles: ["action1","action2"]) { (idx) in
            // do something
        }