SVProgressHUD

//*********************************************************

SVProgressHUD 使用过程:

  1. CocoaPods下载SDK代码包:SVProgressHUD

2.系统库:QuartzCore.framework,Foundation.framework,UIKit.framework,CoreGraphics.framework

3.引进声明文件#import “SVProgressHUD.h”

  1. 需要提示时,加入调用提示框指令生成不同种类的提示框对象(带有Style/AnimationType/MaskType)

Eg: [SVProgressHUD showWithStatus:@“加载中…” maskType:SVProgressHUDMaskTypeGradient]

5.需要隐藏时,加入隐藏当前提示框指令隐藏提示框对象

Eg:[SVProgressHUD dismiss]

//*********************************************************

SVProgressHUD :第三方弹出提示层控件,提示网络加载或提示对错。

SVProgressHUD特点:

  1. 提示当前所处状态。如:网络传输、提交中、操作成功或失败等。

  2. 设置提示的poplayer为model即在提示的时间点允许用户做其他操作 。

  3. 可以设置背景色和自定义提示的内容 。

  4. 非常简洁,代码量少。

SVProgressHUD 用法介绍:

    • (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType自定义状态提示内容和 提示层的样式model
    • (void)dismiss 关闭当前提示框 。

SVProgressHUDMaskType 介绍:

  1. SVProgressHUDMaskTypeNone : 在提示框显示时,仍可以做其他操作,如View 上面的输入等 。

  2. SVProgressHUDMaskTypeClear :在提示框显示时, 不可以做其他操作

  3. SVProgressHUDMaskTypeBlack :在提示框显示时,不可以做其他操作且背景色是黑色

  4. SVProgressHUDMaskTypeGradient : 在提示框显示时,不可以做其他操作且背景色是渐变的

5.SVProgressHUDMaskTypeCustom:

SVProgressHUDStyle介绍:

1.SVProgressHUDStyleLight

2.SVProgressHUDStyleDark

3.SVProgressHUDStyleCustom

SVProgressHUDAnimationType介绍:

1.SVProgressHUDAnimationTypeFlat

2.SVProgressHUDAnimationTypeNative

SVProgressHUD底层包中的相关方法:

  • (void)show;

  • (void)showWithStatus:(NSString*)status;

  • (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType;

  • (void)showWithMaskType:(SVProgressHUDMaskType)maskType;

  • (void)showSuccessWithStatus:(NSString*)string;

  • (void)showSuccessWithStatus:(NSString *)string duration:(NSTimeInterval)duration;+ (void)showErrorWithStatus:(NSString *)string;

  • (void)showErrorWithStatus:(NSString *)string duration:(NSTimeInterval)duration;

  • (void)setStatus:(NSString*)string; // change the HUD loading status while it’s showing

  • (void)dismiss; // simply dismiss the HUD with a fade+scale out animation

  • (void)dismissWithSuccess:(NSString*)successString; // also displays the success icon image

  • (void)dismissWithSuccess:(NSString*)successString afterDelay:(NSTimeInterval)seconds;

  • (void)dismissWithError:(NSString*)errorString; // also displays the error icon image

  • (void)dismissWithError:(NSString*)errorString afterDelay:(NSTimeInterval)seconds;

  • (BOOL)isVisible;

SVProgressHUD 用法网址:

http://www.cnblogs.com/xunziji/archive/2012/11/05/2754915.html - SVProgressHUD

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

HaiJunYa

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值