IOS内购时的Loading实现-MBProgressHUD
来源:互联网 发布:化工就业数据 编辑:程序博客网 时间:2024/06/08 07:47
MBProgressHUD是替代UIProgressHUD的一个小工具,使用方法也非常简单
下载地址是: http://github.com/matej/MBProgressHUD
#import <UIKit/UIKit.h>#import "MBProgressHUD.h" @interface HudDemoViewController : UIViewController <MBProgressHUDDelegate> { MBProgressHUD *HUD;} - (IBAction) showWithLabel:(id)sender; - (void) myTask; @end@implementation HudDemoViewController- (IBAction) showWithLabel:(id)sender {// Should be initialized with the windows frame so the HUD disables all user input by covering the entire screenHUD = [[MBProgressHUD alloc] initWithWindow:[UIApplication sharedApplication].keyWindow];// Add HUD to screen[self.view.window addSubview:HUD];// Regisete for HUD callbacks so we can remove it from the window at the right timeHUD.delegate = self;HUD.labelText = @"Loading";// Show the HUD while the provided method executes in a new thread[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];}- (void) myTask {// Do something usefull in here instead of sleeping ...sleep(3);}- (void)hudWasHidden {// Remove HUD from screen when the HUD was hidded[HUD removeFromSuperview];[HUD release];}@end
- IOS内购时的Loading实现-MBProgressHUD
- iOS MBProgressHUD的使用
- MBProgressHUD的使用-ios
- iOS MBProgressHUD 的使用方法
- 【iOS知识学习】_进度条的实现(MBProgressHUD)
- iOS: MBProgressHUD的一个exception
- ios 指示器MBProgressHUD 的使用
- ios MBProgressHUD的基本使用
- iOS MBProgressHUD的简单使用
- MBProgressHUD开源loading状态
- MBProgressHUD开源loading状态
- MBProgressHUD自定义Loading图片
- iOS 简单的loading弹出框实现
- ios MBProgressHUD
- ios MBProgressHUD
- IOS-MBProgressHUD常见的几种用法
- iOS开发之MBProgressHUD的使用
- IOS MBProgressHUD第三方库的封装
- jquery人才网弹出层选择工作地区特效
- 数据结构(5)——树及树的遍历
- Android中关于FileObserver类的监听文件和目录动态
- 应用场景之Dynamic End Point(DEP)IPSec的配置
- 用SWT可视化工具快速开发GUI应用
- IOS内购时的Loading实现-MBProgressHUD
- jquery绘制中国地图代码
- Android中Bitmap和Drawable
- Android学习笔记01:开发环境搭建
- ARM中的中断向量表
- ASP.NET操作EXCEL 合并单元格 大全
- Qt重绘之update,repaint详解
- 通用excel 导出
- 拖动无标题栏的对话框(MFC)