自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

iPhone程序讀取數(shù)據(jù)時(shí)顯示進(jìn)度窗

移動(dòng)開發(fā) iOS
本文介紹的是iPhone程序讀取數(shù)據(jù)時(shí)顯示進(jìn)度窗,詳細(xì)講述了如何實(shí)現(xiàn)的,先來看內(nèi)容。

iPhone程序讀取數(shù)據(jù)時(shí)顯示進(jìn)度窗是本文要介紹的內(nèi)容,如何在iPhone程序讀取數(shù)據(jù)時(shí)顯示進(jìn)度窗?先來看內(nèi)容。

下面代碼說明如何使用iPhone 非官方SDK在讀取數(shù)據(jù)時(shí)顯示進(jìn)度條。

以下代碼參考了MobileRss。

定義頭文件:

  1. #import "uikit/UIProgressHUD.h"  
  2.    
  3. @interface EyeCandy : UIApplication {  
  4.  UIProgressHUD *progress;  
  5. }  
  6. - (void) showProgressHUD:(NSString *)label withWindow:(UIWindow *)w withView:(UIView *)v withRect:(struct CGRect)rect;  
  7. - (void) hideProgressHUD;  
  8.  
  9. @end 

上面的引號(hào)要改成<>。

  1. import "EyeCandy.h"  
  2.    
  3. @implementation EyeCandy  
  4. - (void)showProgressHUD:(NSString *)label withWindow:(UIWindow *)w withView:(UIView *)v withRect:(struct CGRect)rect  
  5. {  
  6.  progress = [[UIProgressHUD alloc] initWithWindow: w];  
  7.  [progress setText: label];  
  8.  [progress drawRect: rect];  
  9.  [progress show: YES];  
  10.    
  11.  [v addSubview:progress];  
  12. }  
  13.    
  14. - (void)hideProgressHUD  
  15. {  
  16.  [progress show: NO];  
  17.  [progress removeFromSuperview];  
  18. }  
  19. @end 

使用下面代碼調(diào)用:

  1. // Setup Eye Candy View  
  2. _eyeCandy = [[[EyeCandy alloc] init] retain];  
  3.    
  4. // Call loading display  
  5. [_eyeCandy showProgressHUD:@"Loading …" withWindow:window withView:mainView withRect:CGRectMake(0.0f, 100.0f, 320.0f, 50.0f)];  
  6.    
  7. // When finished for hiding the &quot;loading text&quot;  
  8. [_eyeCandy hideProgressHUD]; 

小結(jié):iPhone程序讀取數(shù)據(jù)時(shí)顯示進(jìn)度窗的內(nèi)容介紹完了,希望本文對(duì)你有所幫助!

責(zé)任編輯:zhaolei 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-08-12 14:58:43

iPhoneTableview數(shù)據(jù)

2011-08-22 11:28:46

iPhone開發(fā)BMP

2023-03-06 07:25:17

LinuxAdvanced

2011-07-29 10:51:41

iPhone 全屏顯示 視圖

2021-01-07 09:35:49

Pythontqdm進(jìn)度

2011-07-21 10:47:37

iPhone Cocoa 委托

2009-08-18 09:49:00

C# listview

2011-07-08 15:08:16

iPhone 圖片

2011-02-22 14:53:41

titlebar標(biāo)題欄Android

2011-06-07 13:44:40

VC

2009-04-04 08:58:45

Palmiphone移動(dòng)OS

2016-11-18 12:46:51

AndroidiPhone

2011-08-19 14:47:48

iPhoneiPhone4iPad

2010-06-18 12:52:01

SQL Server

2013-01-05 13:50:13

AjaxWebASP.NET MVC

2023-04-04 09:20:34

ArkUI下載進(jìn)度條

2011-07-26 11:13:15

iPhone PXL

2011-08-15 10:15:00

iPhone開發(fā)警告框

2017-01-05 11:26:22

騰訊云微信小程序

2011-07-20 17:10:05

iPhone iAd
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)