开源第三方提示框控件SVProgressHUD

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

SVProgressHUD 使用过程:

1. CocoaPods下载SDK代码包:SVProgressHUD

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

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

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

 Eg: [SVProgressHUD showWithStatus:@"加载中..." maskType:SVProgressHUDMaskTypeGradient]

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

Eg:[SVProgressHUD dismiss]

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

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


开源第三方提示框控件SVProgressHUD_第1张图片

SVProgressHUD特点:

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

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

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

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

SVProgressHUD 用法介绍:

 1. + (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType自定义状态提示内容和 提示层的样式model

 2. + (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

你可能感兴趣的:(开源第三方提示框控件SVProgressHUD)