Latest 0.0.4
Homepage https://github.com/fanxiaocong/XCProgressHUD
License MIT
Platforms ios 9.0
Dependencies JGProgressHUD
Authors

CI Status
Version
License
Platform
Support 


Author 小小聪明屋
E-mail [email protected]
GitHub https://github.com/fanxiaocong
Blog http://www.cnblogs.com/fanxiaocong

Example

基于 JGProgressHUD,在此基础上封装了几款简单的提示框, 通过分类的形式调用,使用简单。

加载HUD

  • 示例

Loading

  • 代码
[self.view showHUDWithText:@"正在发送..."];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
    [self.view showSuccess:@"操作成功..."];
});

文本HUD

  • 示例

Loading

  • 代码
 [self.view showText:@"这是文本提示"];

成功HUD

  • 示例

Loading

  • 代码
[self.view showSuccess:@"操作成功..."];

失败HUD

  • 示例

Loading

  • 代码
 [self.view showError:@"加载失败..."];

警告HUD

  • 示例

Loading

  • 代码
[self.view showWarning:@"非法操作..."];

进度HUD

  • 示例

Loading

  • 代码
/// 模拟进度显示
- (void)showProgressHUD:(int)progress
{
    progress += 1;
    [self.view updateProgress:progress/100.0];

    if (progress == 100) {
        [self.view showSuccess:@"下载完成"];
    } else {
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.02 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [self showProgressHUD:progress];
        });
    }
}

Installation

CocoaPods

pod 'XCProgressHUD'

Latest podspec

{
    "name": "XCProgressHUD",
    "version": "0.0.4",
    "summary": "u57fau4e8eJGProgressHUDuff0cu5c01u88c5u4e86u51e0u6b3eu7b80u5355u7684u63d0u793au6846",
    "description": "XCProgressHUDuff0cu57fau4e8eJGProgressHUDuff0cu5c01u88c5u4e86u51e0u6b3eu7b80u5355u7684u63d0u793au6846",
    "homepage": "https://github.com/fanxiaocong/XCProgressHUD",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "fanxiaocong": "[email protected]"
    },
    "source": {
        "git": "https://github.com/fanxiaocong/XCProgressHUD.git",
        "tag": "0.0.4"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "XCProgressHUD/Classes/**/*",
    "dependencies": {
        "JGProgressHUD": [
            "~> 2.0.2"
        ]
    }
}

Pin It on Pinterest

Share This