iPhone程序读取数据时显示进度窗
2012-02-13 20:39
411 查看
iPhone程序读取数据时显示进度窗是本文要介绍的内容,如何在iPhone程序读取数据时显示进度窗?先来看内容。
下面代码说明如何使用iPhone 非官方SDK在读取数据时显示进度条。
以下代码参考了MobileRss。
定义头文件:
上面的引号要改成<>。
使用下面代码调用:
小结:iPhone程序读取数据时显示进度窗的内容介绍完了,希望本文对你有所帮助!
下面代码说明如何使用iPhone 非官方SDK在读取数据时显示进度条。
以下代码参考了MobileRss。
定义头文件:
#import "uikit/UIProgressHUD.h" @interface EyeCandy : UIApplication { UIProgressHUD *progress; } - (void) showProgressHUD:(NSString *)label withWindow:(UIWindow *)w withView:(UIView *)v withRect:(struct CGRect)rect; - (void) hideProgressHUD; @end
上面的引号要改成<>。
import "EyeCandy.h" @implementation EyeCandy - (void)showProgressHUD:(NSString *)label withWindow:(UIWindow *)w withView:(UIView *)v withRect:(struct CGRect)rect { progress = [[UIProgressHUD alloc] initWithWindow: w]; [progress setText: label]; [progress drawRect: rect]; [progress show: YES]; [v addSubview:progress]; } - (void)hideProgressHUD { [progress show: NO]; [progress removeFromSuperview]; } @end
使用下面代码调用:
// Setup Eye Candy View _eyeCandy = [[[EyeCandy alloc] init] retain]; // Call loading display [_eyeCandy showProgressHUD:@"Loading …" withWindow:window withView:mainView withRect:CGRectMake(0.0f, 100.0f, 320.0f, 50.0f)]; // When finished for hiding the "loading text" [_eyeCandy hideProgressHUD];
小结:iPhone程序读取数据时显示进度窗的内容介绍完了,希望本文对你有所帮助!
相关文章推荐
- 如何在iPhone程序读取数据时显示进度窗
- 如何在iPhone程序读取数据时显示进度窗
- 第4章 处理用户输入与显示数据------------(读取参数、读取程序名称、测试参数)
- C# WPF 进度条,根据读取数据显示进度条进度,根据Excel文件读取数据,进度条样式
- 程序间获取ALV显示数据(读取ALV GRID上的数据)
- 复制文件时,如何显示进度条(使用BlockRead函数读取数据,并插入application.ProcessMessages)
- 第4章 处理用户输入与显示数据------------(读取参数、读取程序名称、测试参数)
- STM32F103读取原始数据,上位机显示(附上微机和程序源码)
- 第4章 处理用户输入与显示数据------------(读取参数、读取程序名称、测试参数)
- C++ 从数据库读取数据,将数据显示在界面上的TreeCtrl上
- (四)、读取数据库数据并在HighCharts上显示
- ALchemy学习-从mysql数据库读取数据显示到页面
- 程序打印0~200之间能被7整除但不能被4整除,并且每行显示6个数据
- iPhone开发:在UIAlertView中显示进度条
- 大数据 IMF 传奇 困扰很久的问题解决!ecliplse 远程提交程序到虚拟机 hadoop集群 ,ecliplse 没有显示输出 的问题解决!
- MFC(5)读取AVI视频数据并且显示到界面窗口上源码
- 小程序-读取视频数据 每个N帧采样保存
- 汇编-从键盘输入数据并显示的程序
- 点击按钮从数据库中读取数据,然后通过JTable显示