首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

运用MBProgressHUD

2012-09-09 
使用MBProgressHUD1、首先去https://github.com/jdg/MBProgressHUD下载包创建项目,把包里的MBProgressHUD.h

使用MBProgressHUD

1、首先去https://github.com/jdg/MBProgressHUD下载包

创建项目,把包里的MBProgressHUD.h和MBProgressHUD.m源文件copy到您的项目中。

2、使用的类里面导入#import "MBProgressHUD.h"

3、在类中定义MBProgressHUD* progressTest;

创建:

progressTest = [MBProgressHUD showHUDAddedTo:self.view animated:YES];    progressTest.labelText = @"加载中...";

progressTest.mode = MBProgressHUDModeIndeterminate;可以显示不同风格的进度;

typedef enum {

/** Progress is shown using an UIActivityIndicatorView. This is the default. */

MBProgressHUDModeIndeterminate,

/** Progress is shown using a round, pie-chart like, progress view. */

MBProgressHUDModeDeterminate,

/** Progress is shown using a ring-shaped progress view. */

MBProgressHUDModeAnnularDeterminate,

/** Shows a custom view */

MBProgressHUDModeCustomView,

/** Shows only labels */

MBProgressHUDModeText

} MBProgressHUDMode;

/ **显示进度使用UIActivityIndicatorView。这是默认的。 * /

/ **显示进度采用圆饼图,进步观。 * /

/**进展示出使用环形进度视图。 * /

/ **显示一个自定义视图* /

/ **仅显示标签* /


热点排行