偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

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

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

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

下面代碼說明如何使用iPhone 非官方SDK在讀取數(shù)據(jù)時顯示進(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 

上面的引號要改成<>。

  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ù)時顯示進(jìn)度窗的內(nèi)容介紹完了,希望本文對你有所幫助!

責(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 全屏顯示 視圖

2011-07-21 10:47:37

iPhone Cocoa 委托

2011-07-08 15:08:16

iPhone 圖片

2009-08-18 09:49:00

C# listview

2021-01-07 09:35:49

Pythontqdm進(jìn)度

2009-04-04 08:58:45

Palmiphone移動OS

2011-08-19 14:47:48

iPhoneiPhone4iPad

2016-11-18 12:46:51

AndroidiPhone

2011-02-22 14:53:41

titlebar標(biāo)題欄Android

2011-06-07 13:44:40

VC

2011-07-26 11:13:15

iPhone PXL

2011-07-20 17:10:05

iPhone iAd

2011-08-15 10:15:00

iPhone開發(fā)警告框

2010-06-18 12:52:01

SQL Server

2011-08-17 16:12:20

iPhone應(yīng)用程序

2011-08-17 16:16:29

iPhone應(yīng)用程序啟動過程

2023-04-04 09:20:34

ArkUI下載進(jìn)度條
點贊
收藏

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