Latest 0.1.0
Homepage https://github.com/king129/SJProgressHUD
License MIT
Platforms ios 8.0, requires ARC
Authors

基本用法

  • 除了动画图片API以外的API,都是默认3秒后移除,如果不需要自动移除只需将 autoRemove 参数传入 false
@IBAction func loadImage(sender: AnyObject) {
        var images = Array<UIImage>()
        for i in 1...31 {
            let patch =  NSBundle.mainBundle().pathForResource("load_(i)@2x.png", ofType: nil, inDirectory: nil)
            let image = UIImage(contentsOfFile: patch!)
            images.append(image!)
        }
        SJProgressHUD.showWaitingWithImages(images)
    }
    @IBAction func Waiting(sender: AnyObject) {
        SJProgressHUD.showWaiting("正在加载中......")
    }
    @IBAction func Success(sender: AnyObject) {
        SJProgressHUD.showSuccess()
    }
    @IBAction func Error(sender: AnyObject) {
        SJProgressHUD.showError()
    }
    @IBAction func Info(sender: AnyObject) {
        SJProgressHUD.showInfo()
    }
    @IBAction func OnlyText(sender: AnyObject) {
        SJProgressHUD.showOnlyText("这是打酱油的!!这是打酱油的!!这是打酱油的!!这是打酱油的!!这是打酱油的!!这是打酱油的!!")
    }
    @IBAction func statusBar(sender: AnyObject) {
        SJProgressHUD.showStatusBarWithText()
    }
    @IBAction func dismiss(sender: AnyObject) {
        SJProgressHUD.dismiss()
    }

CocoaPods安装

use_frameworks!
target 'target' do
pod 'SJProgressHUD'
end

目前还有个BUG,横屏时状态栏显示位置不对,不知道咋解决

Latest podspec

{
    "name": "SJProgressHUD",
    "version": "0.1.0",
    "platforms": {
        "ios": "8.0"
    },
    "summary": "u7eafswift HUDu63d0u793au6846 u4f7fu7528u7b80u5355",
    "homepage": "https://github.com/king129/SJProgressHUD",
    "license": "MIT",
    "authors": {
        "king129": "[email protected]"
    },
    "source": {
        "git": "https://github.com/king129/SJProgressHUD.git",
        "tag": "0.1.0"
    },
    "source_files": "SJProgressHUD",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This