iOS MBProgressHUD的使用方法

2021-07-25 06:05:50 字數 1085 閱讀 6447

mbprogresshud就是乙個非常好用的第三方庫,可以快速接入載入的介面,下面貼**,下面的**包含了各種常用型別的載入:

#import "viewcontroller.h"

#import "mbprogresshud.h"

@inte***ce viewcontroller ()

@property (atomic, assign) bool canceled;

@end

@implementation viewcontroller

- (void)viewdidload

//僅顯示載入的圖示

- (ibaction)indeterminateexample:(id)sender

); });

}- (ibaction)with_details_label:(id)sender

); });

}- (ibaction)with_label:(id)sender

); });

}- (ibaction)circle_style:(id)sender

); });

}- (ibaction)progress_style:(id)sender

); });

}- (ibaction)text_only:(id)sender

- (ibaction)with_action_button:(id)sender

); });

}- (ibaction)custom_view:(id)sender

- (void)dosomeworkwithprogress );

usleep(50000);

}}-(void)dosomework

- (void)cancelwork:(id)sender

- (void)didreceivememorywarning

@end

以上是全部**,效果圖如下:

IOS MBProgressHUD常見的幾種用法

用法一 最簡單的用法,不需要其他的操作 1 在資料載入之前新增 mbprogresshud showhudaddedto self view animated yes 開始載入資料提示 2 在資料載入成功之後新增 mbprogresshud hidehudforview self view anim...

iOS MBProgressHUD的基本使用

方式1.直接在view上show hud mbprogresshud showhudaddedto self.view animated yes retain hud.delegate self 常用的設定 小矩形的背景色 hud.color uicolor clearcolor 這兒表示無背景 顯...

dbms output put line使用方法

begin dbms output.put line a end 如果你是再sql plus中,只要再環境中打出 set serveroutput on 就可以了.還有一種方法 就是使用環境中的繫結變數也可以.再環境中定義 variable name varchar2 50 然後把過程新增乙個out...