Skip to content

liuhaoliang/HLAlert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

An easy way to use AlertView and ActionSheet in your Object-C or Swift project,this library are based on UIAlertViewController.

demo.gif]

Usage:

  1. add the repo in your podfile
  2. use pod 'HLAlert' or drag the library into your project folder
  • Use Object-C

  1. import the header
#import <HLAlert/HLAlert-Swift.h>
  1. write the method
[HLAlert showAlertWithTitle:@"title" message:@"message" actionTitles:@[@"action1",@"action2"] handler:^(NSInteger idx) {
        //do something
    }];
  • Use Swift

  1. import the header
import HLAlert
  1. write the method
HLAlert.showAlert(title: "title", message: "message", actionTitles: ["action1","action2"]) { (idx) in
            // do something
        }

About

🚀An easy way to use AlertView and ActionSheet in your Object-C or Swift project,written based on UIAlertViewController.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages