弱提示,定时消失
Objective-C Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
HLAlertCenter
HLAlertCenterDemo.xcodeproj
HLAlertCenterDemo
.gitignore
.swift-version
HLAlertCenter.podspec
LICENSE
README.md
ScreenShot1.png
ScreenShot2.png
ScreenShot3.png
ScreenShot4.png

README.md

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

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