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

iPhone開發(fā)工具介紹與應(yīng)用 (上篇)

移動(dòng)開發(fā) iOS
本文來介紹iPhone開發(fā)工具的介紹與應(yīng)用,iphone開發(fā)工具應(yīng)有盡有,文中很詳細(xì)的介紹了iphone開發(fā)工具的能力,來看本文內(nèi)容。

iPhone開發(fā)工具介紹與應(yīng)用是本文要介紹的內(nèi)容,分為上下節(jié)為友們介紹,如若你對(duì)iphone開發(fā)工具感興趣的話,請(qǐng)參考 iPhone開發(fā)工具介紹與應(yīng)用 (下篇),內(nèi)容更精彩。來看本文內(nèi)容詳解。

iPhone開發(fā)工具之將XIB文件轉(zhuǎn)換為Objective-C源程序

nib2objc是一個(gè)小巧的轉(zhuǎn)換工具,可以將XIB文件自動(dòng)轉(zhuǎn)換為Objective-C的源代碼文件。

通常,考慮到程序的效率時(shí),才將XIB直接轉(zhuǎn)換為源代碼文件。但是這樣一來,通過Interface Builder設(shè)定的實(shí)例變量與行為方法的接續(xù)也沒有了,需要從新手寫。但是,該工具的源代碼是公開的,稍加修飾,就能完成大部分工作。

使用的時(shí)候,首先下載的工程代碼并用XCode編譯一下,會(huì)生成一個(gè)命令行程序文件 nib2objc。然后如下所示執(zhí)行轉(zhuǎn)換:

  1. $ nib2objc WebView.xib > WebView.m 

iPhone開發(fā)工具介紹與應(yīng)用

像是上面view轉(zhuǎn)換后會(huì)輸出以下代碼:

  1. UIBarButtonItem *view39 = [[UIBarButtonItem alloc]   
  2. initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];   
  3. view39.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);   
  4. view39.enabled = YESview39.style = UIBarButtonItemStylePlain;   
  5. view39.tag = 0view39.width = 0.000; UIBarButtonItem   
  6. *view64 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:nil action:nil];  
  7.  view64.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);   
  8.  view64.enabled = YES;   
  9.  view64.style = UIBarButtonItemStylePlain;   
  10.  view64.tag = 0view64.width = 0.000;   
  11.  UIBarButtonItem *view57 = [[UIBarButtonItem alloc]   
  12.  initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];   
  13.  view57.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);  
  14.   view57.enabled = YESview57.style = UIBarButtonItemStylePlain;   
  15.  view57.tag = 0view57.width = 0.000;   
  16.  UIBarButtonItem *view33 = [[UIBarButtonItem alloc]   
  17.  initWithTitle:(null) style:UIBarButtonItemStylePlain target:nil action:nil];   
  18.  view33.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);   
  19.  view33.enabled = YESview33.image = nil;   
  20.  view33.style = UIBarButtonItemStylePlain;  
  21.   view33.tag = 0view33.width = 0.000;   
  22.   UIBarButtonItem *view66 = [[UIBarButtonItem alloc]   
  23.   initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];   
  24.   view66.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);  
  25.    view66.enabled = YES;   
  26.   view66.style = UIBarButtonItemStylePlainview66.tag = 0view66.width = 0.000; UIWebView  
  27.    *view31 = [[UIWebView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 460.0)];   
  28.   view31.frame = CGRectMake(0.0, 0.0, 320.0, 460.0);   
  29.   view31.alpha = 1.000;   
  30.   view31.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;   
  31.   view31.backgroundColor = [UIColor colorWithWhite:1.000 alpha:1.000];   
  32.   view31.clearsContextBeforeDrawing = YESview31.clipsToBounds = YES;   
  33.   view31.contentMode = UIViewContentModeScaleToFillview31.detectsPhoneNumbers = NOview31.hidden = NO;   
  34.   view31.multipleTouchEnabled = YES;   
  35.   view31.opaque = YES;   
  36.   view31.scalesPageToFit = YES;  
  37.   view31.tag = 0;   
  38.   view31.userInteractionEnabled = YES;   
  39.  UIBarButtonItem *view56 = [[UIBarButtonItem alloc]   
  40.  initWithBarButtonSystemItem:UIBarButtonSystemItemStop target:nil action:nil];   
  41.  view56.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);   
  42.  view56.enabled = YES;   
  43.  view56.style = UIBarButtonItemStylePlain;   
  44.  view56.tag = 0;   
  45.  view56.width = 0.000;   
  46.  UIBarButtonItem *view48 = [[UIBarButtonItem alloc]   
  47.  initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];   
  48.  view48.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);   
  49.  view48.enabled = YES;  
  50.   view48.style = UIBarButtonItemStylePlain;   

UIToolbar

  1. *view32 = [[UIToolbar alloc]   
  2. initWithFrame:CGRectMake(0.0, 416.0, 320.0, 44.0)];   
  3. view32.frame = CGRectMake(0.0, 416.0, 320.0, 44.0);   
  4. view32.alpha = 1.000;  
  5.  view32.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;   
  6.  view32.barStyle = UIBarStyleBlackTranslucent;   
  7.  view32.clearsContextBeforeDrawing = NO;   
  8.  view32.clipsToBounds = NO;   
  9.  view32.contentMode = UIViewContentModeScaleToFill;   
  10.  view32.hidden = NO;   
  11.  view32.multipleTouchEnabled = NO;   
  12.  view32.opaque = NO;  
  13.   view32.tag = 0;  
  14.  view32.userInteractionEnabled = YES;   
  15.  UIBarButtonItem *view34 = [[UIBarButtonItem alloc]   
  16.  initWithTitle:(null) style:UIBarButtonItemStylePlain target:nil action:nil];  
  17.   view34.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);   
  18.   view34.enabled = YESview34.image = nil;   
  19.   view34.style = UIBarButtonItemStylePlain;   
  20.   view34.tag = 0;   
  21.   view34.width = 0.000;   
  22.   UIBarButtonItem *view36 = [[UIBarButtonItem alloc]   
  23.   initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];   
  24.   view36.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);   
  25.   view36.enabled = YES;   
  26.   view36.style = UIBarButtonItemStylePlain;  
  27.   view36.tag = 0;   
  28.   view36.width = 0.000;   
  29.   UIView *view27 = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 460.0)];   
  30.   view27.frame = CGRectMake(0.0, 0.0, 320.0, 460.0);   
  31.   view27.alpha = 1.000;  
  32. view27.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin;   
  33. view27.backgroundColor = [UIColor colorWithWhite:1.000 alpha:1.000]; view27.clearsContextBeforeDrawing = NO;   
  34. view27.clipsToBounds = NO;   
  35. view27.contentMode = UIViewContentModeScaleToFill;   
  36. view27.hidden = NO;  
  37.  view27.multipleTouchEnabled = NO;  
  38.   view27.opaque = YES;   
  39.   view27.tag = 0;   
  40.   view27.userInteractionEnabled = YES;   
  41.   UIBarButtonItem *view38 = [[UIBarButtonItem alloc]  
  42.    initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];   
  43.    view38.frame = CGRectMake(0.0, 0.0, 0.0, 0.0);   
  44.    view38.enabled = YES;   
  45.    view38.style = UIBarButtonItemStylePlain;   
  46.    view38.tag = 0view38.width = 0.000;   
  47.    UIBarButtonItem *view35 = [[UIBarButtonItem alloc]   
  48.    initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:nil action:nil]; 
  49. view35.frame = CGRectMake(0.0, 0.0, 0.0, 0.0); 
  50. view35.enabled = YES;
  51.  view35.style = UIBarButtonItemStylePlain;   
  52.    view35.tag = 0;   
  53.    view35.width = 0.000;   
  54.    [view27 addSubview:view31];   
  55.    [view32 addSubview:view33];   
  56.    [view32 addSubview:view34];   
  57.    [view32 addSubview:view36];   
  58.    [view32 addSubview:view38];   
  59.    [view32 addSubview:view39];   
  60.    [view32 addSubview:view48];   
  61.    [view32 addSubview:view57];   
  62.    [view32 addSubview:view35];   
  63.    [view32 addSubview:view56];   
  64.    [view32 addSubview:view64];   
  65.    [view32 addSubview:view66];   
  66.    [view27 addSubview:view32]; 

小結(jié):iPhone開發(fā)工具介紹與應(yīng)用 (上篇)的內(nèi)容介紹完了,希望本文對(duì)你有所幫助,請(qǐng)深入來了解iphone開發(fā)工具。請(qǐng)繼續(xù)閱讀 iPhone開發(fā)工具介紹與應(yīng)用 (下篇)

責(zé)任編輯:zhaolei 來源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2011-08-04 16:28:01

iPhone 開發(fā)工具 Accessoriz

2011-08-05 10:13:45

iPhone開發(fā)工具 Cocoa Xcode

2011-07-19 09:46:38

2010-09-10 13:19:48

放寬限制開發(fā)工具iPhone

2011-08-11 10:16:23

iPhoneUIView視圖

2011-07-06 17:48:30

iPhone Xcode 模擬器

2010-06-03 12:41:45

Linux 開發(fā)工具

2017-01-05 14:28:43

Linux內(nèi)核代碼源碼

2011-08-08 16:56:44

iPhone 字符處理 視圖

2011-08-15 10:35:43

iPhone開發(fā)Atomicnonatomic

2022-10-27 15:57:26

開發(fā)工具鴻蒙

2010-01-21 10:44:59

Visual C++

2010-02-24 10:57:19

Python開發(fā)工具

2010-06-10 17:45:03

Linux 開發(fā)工具

2010-03-10 09:55:56

Python開發(fā)工具

2020-11-19 10:05:03

Java

2017-03-12 11:42:21

Linux致遠(yuǎn)電子內(nèi)核源碼

2010-03-15 15:55:00

Python開發(fā)工具

2010-04-26 09:28:43

Oracle數(shù)據(jù)庫(kù)

2010-05-28 13:38:29

Linux開發(fā)工具
點(diǎn)贊
收藏

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