开源第三方提示框控件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. 提示当前所处状态。如:网络传输、提交中、操作成功或失败等。

 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一些看法以及感悟。过程中自己感受到...
    纸简书生阅读 39,464评论 39 224
  • SVProgressHUD 是一个第三方的控件,是一个弹出提示层,用来提示 网络加载 或 提示对错,看下面图,你就...
    以德扶人阅读 8,637评论 4 51
  • 在iOS开发中不可避免的会用到一些第三方类库,它们提供了很多实用的功能,使我们的开发变得更有效率;同时,也可以从它...
    蘇哲炫爺阅读 960评论 0 0
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 12,232评论 4 61
  • “我就说是27号。” 张文霞收好手机,然后一只手撑着倚在铁架子上,另一个手抚着肚子打圈,带着慈祥宽慰而又轻松的笑容...
    王景三阅读 136评论 0 0