HLAlertCenter 1.1

HLAlertCenter 1.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jun 2017

Maintained by lihongli.


Downloads

Total30
Week4
Month18

Installs

Apps2
Apps WeekApps This Week 1
powered by Segment

GitHub

Stars0
Watchers1
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files6
LOCLines of Code 357


  • By
  • lihongli

-- 弱提示弹框,定时消失。分为只显示一个和队列显示

pod 初始化

pod 'HLAlertCenter'
pod install

代码如下

- (void)postMessage:(NSString *)tip;
- (void)postMessage:(NSString *)tip image:(UIImage *)image;

- (void)postMessage:(NSString *)message origin_y:(float)origin_y;
- (void)postMessage:(NSString *)message image:(UIImage *)image origin_y:(float)origin_y;

使用方式:

typedef enum : NSUInteger {
    HLAlertShowDefault,
    HLAlertShowQueue,
} HLAlertShowType;

    [self postMessage:@"测试测试测试测试测试测试"];
    [self postMessage:@"测试测试测试测试测试测试" image:[UIImage imageNamed:@"SVLoadingView"]];

或者

    [[HLAlertCenter defaultCenter] postAlertWithMessage:@"测试测试测试测试测试测试"];
    [[HLAlertCenter defaultCenter] postAlertWithMessage:@"测试测试测试测试测试测试"  image:[UIImage imageNamed:@"SVLoadingView"]];

效果图如下: image image

 [[HLAlertCenter defaultCenter] postMessage:@"测试测试测试测试测试测试" origin_y:0];
 [[HLAlertCenter defaultCenter] postMessage:@"测试测试测试测试测试测试" image:[UIImage imageNamed:@"SVLoadingView"]];

或者

[[HLAlertCenter defaultCenter] postMessage:@"测试测试测试测试测试测试" origin_y:0];
[[HLAlertCenter defaultCenter] postMessage:@"测试测试测试测试测试测试" image:[UIImage imageNamed:@"SVLoadingView"]];

效果图如下: image image