MBProgressHud使用总结
来源:互联网 发布:剑网三捏脸数据萝莉 编辑:程序博客网 时间:2024/06/05 19:56
HUD的各种样式
typedefenum {
MBProgressHUDModeIndeterminate, 默认UIActivityIndicatorView
MBProgressHUDModeDeterminate,
MBProgressHUDModeDeterminateHorizontalBar,
MBProgressHUDModeAnnularDeterminate,
MBProgressHUDModeCustomView,
MBProgressHUDModeText
} MBProgressHUDMode;
// 各种动画效果
typedefenum {
MBProgressHUDAnimationFade,
MBProgressHUDAnimationZoom,
MBProgressHUDAnimationZoomIn
} MBProgressHUDAnimation;
@interface MBProgressHUD : UIView
属性
HUD样式
@property (assign) MBProgressHUDMode mode;
HUD显示和隐藏时的动画样式
@property (assign) MBProgressHUDAnimation animationType;
自定义HUD样式,最好的结果使用37 * 37像素视图(所以边界匹配建立在指标范围内)
@property (MB_STRONG) UIView *customView;
代理对象
@property (MB_WEAK) id<MBProgressHUDDelegate> delegate;
自定义HUD文字
@property (copy) NSString *labelText;
subText
@property (copy) NSString *detailsLabelText;
透明度设置
@property (assign)float opacity;
设置HUD颜色,如果设置颜色,透明度将不能设置
@property (MB_STRONG) UIColor *color;
在父视图x方向的偏移量
@property (assign)float xOffset;
在俯视图y方向的偏移量
@property (assign)float yOffset;
边缘到旋转视图的距离,默认20
@property (assign)float margin;
背景纵向渐变色
@property (assign)BOOL dimBackground;
@property (assign)float graceTime;
@property (assign)float minShowTime;
@property (assign)BOOL taskInProgress;
隐藏时从俯视图删除,默认为no
@property (assign)BOOL removeFromSuperViewOnHide;
mainlabel字体
@property (MB_STRONG) UIFont* labelFont;
sublabel字体
@property (MB_STRONG) UIFont* detailsLabelFont;
进度
@property (assign)float progress;
最小尺寸,默认为0
@property (assign) CGSize minSize;
@property (assign,getter = isSquare) BOOL square;
类方法
创建HUD并添加到View上
+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;
找到最顶层的HUD并隐藏
+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated;
找出View上所有HUD子视图,并隐藏
+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated;
找到最顶层的HUD,返回
+ (MB_INSTANCETYPE)HUDForView:(UIView *)view;
返回View上所有HUD对象数组
+ (NSArray *)allHUDsForView:(UIView *)view;
对象方法
通过Window初始化HUD
- (id)initWithWindow:(UIWindow *)window;
通过View初始化HUD
- (id)initWithView:(UIView *)view;
- (void)show:(BOOL)animated;
- (void)hide:(BOOL)animated;
- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay;
当一个方法在执行期间,显示HUD
- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated;
当一个block在执行期间,显示HUD
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block;
当一个block在一个队列上期间,显示HUD
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion;
当一个block在一个调度队列上是,显示HUD
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue;
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue
completionBlock:(MBProgressHUDCompletionBlock)completion;
HUD完全隐藏时,调用的block
@property (copy) MBProgressHUDCompletionBlock completionBlock;
属性
HUD样式
@property (assign) MBProgressHUDMode mode;
HUD显示和隐藏时的动画样式
@property (assign) MBProgressHUDAnimation animationType;
自定义HUD样式,最好的结果使用37 * 37像素视图(所以边界匹配建立在指标范围内)
@property (MB_STRONG) UIView *customView;
代理对象
@property (MB_WEAK)id<MBProgressHUDDelegate> delegate;
自定义HUD文字
@property (copy) NSString *labelText;
subText
@property (copy) NSString *detailsLabelText;
透明度设置
@property (assign)float opacity;
设置HUD颜色,如果设置颜色,透明度将不能设置
@property (MB_STRONG) UIColor *color;
在父视图x方向的偏移量
@property (assign)float xOffset;
在俯视图y方向的偏移量
@property (assign)float yOffset;
边缘到旋转视图的距离,默认20
@property (assign)float margin;
背景纵向渐变色
@property (assign)BOOL dimBackground;
@property (assign)float graceTime;
@property (assign)float minShowTime;
@property (assign)BOOL taskInProgress;
隐藏时从俯视图删除,默认为no
@property (assign)BOOL removeFromSuperViewOnHide;
mainlabel字体
@property (MB_STRONG) UIFont* labelFont;
sublabel字体
@property (MB_STRONG) UIFont* detailsLabelFont;
进度
@property (assign)float progress;
最小尺寸,默认为0
@property (assign) CGSize minSize;
@property (assign,getter = isSquare)BOOL square;
完全隐藏时触发此代理方法
- (void)hudWasHidden:(MBProgressHUD *)hud;
@interface MBRoundProgressView : UIView
属性
@property (nonatomic,assign)float progress;
进度条颜色
@property (nonatomic, MB_STRONG) UIColor *progressTintColor;
背景颜色
@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor;
显示样式,圆形或者环形,默认为圆形
@property (nonatomic,assign,getter = isAnnular)BOOL annular;
扁条进度条
@interface MBBarProgressView : UIView
进度
@property (nonatomic,assign)float progress;
线的颜色
@property (nonatomic, MB_STRONG) UIColor *lineColor;
进度条背景颜色,默认clear
@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor;
进度条颜色
@property (nonatomic, MB_STRONG) UIColor *progressColor;
- MBProgressHud使用总结
- MBProgressHUD使用
- 使用MBProgressHUD
- MBProgressHUD使用
- MBProgressHUD使用备忘录
- MBProgressHUD使用--进度条
- MBProgressHUD的使用
- MBProgressHUD的使用
- MBProgressHUD的基本使用
- MBProgressHUD的使用
- iOS MBProgressHUD的使用
- MBProgressHUD的使用
- MBProgressHUD的使用-ios
- MBProgressHUD的基本使用
- MBProgressHUD框架初使用
- MBProgressHUD框架的使用
- MBProgressHUD 的使用详解
- MBProgressHUD的基本使用
- Hibernate Error
- test _bs
- IOS开发—多线程简介
- mysql 开启 log
- delphi学习笔记--ADO数据库连接组件TADOConnect
- MBProgressHud使用总结
- 安卓开发者必备的几个工具
- 2.10 创建多边形表面模型的一些提示
- 图的最小生成树
- 拓展kmp模板
- (1217)HDU
- Linux源码学习之位移赋值
- 黑马程序员---c语言--内存分析与数组
- Codeforces Round #289 (Div. 2, ACM ICPC Rules) E. Pretty Song