開源第三方提示框控件SVProgressHUD

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

SVProgressHUD 使用過程:

1. CocoaPods下載SDK代碼包:SVProgressHUD

2.系統(tǒng)庫:QuartzCore.framework,F(xiàn)oundation.framework,UIKit.framework,CoreGraphics.framework

3.引進聲明文件#import "SVProgressHUD.h"

4. 需要提示時,加入調(diào)用提示框指令生成不同種類的提示框?qū)ο?帶有Style/AnimationType/MaskType)

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

5.需要隱藏時,加入隱藏當前提示框指令隱藏提示框?qū)ο?/p>

Eg:[SVProgressHUD dismiss]

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

SVProgressHUD :第三方彈出提示層控件,提示網(wǎng)絡(luò)加載或提示對錯。


SVProgressHUD特點:

?1. 提示當前所處狀態(tài)。如:網(wǎng)絡(luò)傳輸、提交中、操作成功或失敗等。

?2. 設(shè)置提示的poplayer為model即在提示的時間點允許用戶做其他操作 。

3. 可以設(shè)置背景色和自定義提示的內(nèi)容 。

4. 非常簡潔,代碼量少。

SVProgressHUD 用法介紹:

?1. + (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType自定義狀態(tài)提示內(nèi)容和 提示層的樣式model

?2. + (void)dismiss 關(guān)閉當前提示框 ?。


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底層包中的相關(guān)方法:

+ (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 用法網(wǎng)址:

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 有段時間沒有寫了。這個周末抽空簡單整理了一下關(guān)于自己對SVProgressHUD一些看法以及感悟。過程中自己感受到...
    紙簡書生閱讀 39,616評論 39 224
  • SVProgressHUD 是一個第三方的控件,是一個彈出提示層,用來提示 網(wǎng)絡(luò)加載 或 提示對錯,看下面圖,你就...
    以德扶人閱讀 8,759評論 4 51
  • 在iOS開發(fā)中不可避免的會用到一些第三方類庫,它們提供了很多實用的功能,使我們的開發(fā)變得更有效率;同時,也可以從它...
    蘇哲炫爺閱讀 1,115評論 0 0
  • 發(fā)現(xiàn) 關(guān)注 消息 iOS 第三方庫、插件、知名博客總結(jié) 作者大灰狼的小綿羊哥哥關(guān)注 2017.06.26 09:4...
    肇東周閱讀 15,023評論 4 61
  • “我就說是27號。” 張文霞收好手機,然后一只手撐著倚在鐵架子上,另一個手撫著肚子打圈,帶著慈祥寬慰而又輕松的笑容...
    王景三閱讀 163評論 0 0

友情鏈接更多精彩內(nèi)容