zoukankan      html  css  js  c++  java
  • SVProgressHUD的使用

    GitHub:https://github.com/samvermette/SVProgressHUD
    SVProgressHUD和MBProgressHUD效果差点儿相同,只是不须要使用协议,同一时候也不须要声明实例。
    直接通过类方法进行调用就可以:
    [SVProgressHUD method]

    能够使用下面方法来显示状态:

    + (void)show;
    + (void)showWithMaskType:(SVProgressHUDMaskType)maskType;
    + (void)showWithStatus:(NSString*)string;
    + (void)showWithStatus:(NSString*)string maskType:(SVProgressHUDMaskType)maskType;
    假设须要明白的进度,则使用下面方法:
    + (void)showProgress:(CGFloat)progress;
    + (void)showProgress:(CGFloat)progress status:(NSString*)status;
    + (void)showProgress:(CGFloat)progress status:(NSString*)status maskType:(SVProgressHUDMaskType)maskType;
    通过dismiss方法来隐藏提示:
    + (void)dismiss;
    另外提供了下面方法用于显示状态,并在1秒后自己主动隐藏提示(使用的图标来源于Glyphishhttp://www.glyphish.com/):
    + (void)showSuccessWithStatus:(NSString*)string;
    + (void)showErrorWithStatus:(NSString *)string;
    + (void)showImage:(UIImage*)image status:(NSString*)string; // use 28x28 white pngs

    也能够定制:

    + (void)setBackgroundColor:(UIColor*)color; // default is [UIColor whiteColor]//背影色

    + (void)setForegroundColor:(UIColor*)color; // default is [UIColor blackColor]//内容颜色,如文字、转圈等

    + (void)setRingThickness:(CGFloat)width; // default is 4 pt

    + (void)setFont:(UIFont*)font; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]//文字样式

    + (void)setSuccessImage:(UIImage*)image; // default is bundled success image from Glyphish//设置图片。下同

    + (void)setErrorImage:(UIImage*)image; // default is bundled error image from Glyphish


  • 相关阅读:
    HTML超链接应用场景
    String 字符串和StringBuffer的知识点总结
    猜数游戏代码
    MemoryLayout
    偏swift框架
    git的使用
    寄存器
    swift基础
    枚举
    安装Ubuntu 20.04 以后
  • 原文地址:https://www.cnblogs.com/zfyouxi/p/4085277.html
Copyright © 2011-2022 走看看