Categories
Programming/C Programming/iOS

Protected: Objective-C quick reference / 快速參考

This content is password protected. To view it please enter your password below:

Categories
Programming/iOS

[iOS] 用 UIImagePickerController 從 相片庫挑選一張照片來顯示片段碼 , UIImagePickerControllerSourceTypeSavedPhotosAlbum , didFinishPickingMediaWithInfo ,

.h檔: 要加

@interface ViewController : UIViewController

 

.m 檔:

.
.
.

    
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    picker.delegate = self;
    picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    picker.allowsEditing = YES;

    [self presentViewController:picker animated:YES completion:nil];

    
    resultBox.text = @"Hello World!";
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
    
    [self dismissViewControllerAnimated:YES completion:nil];

    NSLog(@"\nin didFinishPickingMediaWithInfo\n");
    imgBox.image = [info objectForKey:UIImagePickerControllerOriginalImage];

}

Categories
Programming/iOS Software

[iOS] xcode iPhone Simulator 照片存放的位置

~/Library/Application Support/iPhone Simulator

iOS Simulator User Guide

Categories
Programming/C Programming/iOS Software

[參考] Objective-C Cheat Sheet and Quick Reference

Objective-C Cheat Sheet and Quick Reference

URL : http://www.raywenderlich.com/4872/objective-c-cheat-sheet-and-quick-reference

Categories
Programming/iOS

[iOS] Objective-C , block 寫法

螢幕快照 2014 03 05 下午12 37 49

在新的iOS API中block被大量用來取代傳統的delegate和callback,而新的API會大量使用block主要是基於以下兩個原因:

可以直接在程式碼中撰寫等會要接著執行的程式,直接將程式碼變成函數的參數傳入函數中,這是新API最常使用block的地方。 可以存取區域變數,在傳統的callback實作時,若想要存取區域變數得將變數封裝成結構才能使用,而block則是可以很方便地直接存取區域變數。

螢幕快照 2014 03 05 下午3 00 49螢幕快照 2014 03 05 下午3 35 41 螢幕快照 2014 03 05 下午5 43 02 螢幕快照 2014 03 05 下午7 29 09

 

螢幕快照 2014 03 05 下午6 11 37

Objective C Blocks: Summary, Syntax & Best Practices 

http://amattn.com/p/objective_c_blocks_summary_syntax_best_practices.html

 

 

Categories
Programming/iOS

[iOS] xcode 加一個 framework

螢幕快照 2014 03 03 下午3 53 06

 

// ————-

螢幕快照 2014 03 03 下午3 47 16

螢幕快照 2014 03 03 下午3 47 25

 

Categories
Programming/iOS

[iOS] simple XMLRPC program / example code / Use : “The Cocoa XML-RPC Framework” from Eric Czarny

Use : “The Cocoa XML-RPC Framework” from Eric Czarny  – https://github.com/corristo/xmlrpc

螢幕快照 2014 03 02 下午9 06 48

螢幕快照 2014 03 02 下午9 07 50

螢幕快照 2014 03 02 下午9 08 24

Categories
Programming/iOS

[iOS] Simple iOS program : Hello World!

螢幕快照 2014 03 01 下午6 31 37

螢幕快照 2014 03 01 下午6 32 04

Categories
Programming/iOS Video

[iOS] iOS tour videos , iOS 開發教學影片

Building an iPhone App Combining Tab Bar, Navigation and Tab
http://www.youtube.com/watch?v=LBnPfAtswgw

這個影片是比較舊的 xcode (3.5 , 4) , 範例從 空的 App delegate 開始 , 用 coding 方式加進 Tab Bar controller 

 

 

 

 

 

 

 

Objective-C : Classes & methods

http://www.youtube.com/watch?v=dOYz0z8BcuM&feature=share&list=PLg7_sxrfkvipsXzYe1UhQI4Qe6Yh8z_qD&index=17

 

[ Become an iOS Developer ] What You Will Learn – series 

http://www.youtube.com/watch?v=KNYOmXf_jJc&list=PLg7_sxrfkvipsXzYe1UhQI4Qe6Yh8z_qD&feature=share

 

UIViewController  : Understanding View Loading / view lifecycle

http://www.youtube.com/watch?v=i1oz60UUWYA&feature=share&list=PLg7_sxrfkvipsXzYe1UhQI4Qe6Yh8z_qD&index=33

 

Create views programmatically

http://www.youtube.com/watch?v=9dsG4R5WE2g&feature=share&list=PLg7_sxrfkvipsXzYe1UhQI4Qe6Yh8z_qD&index=38

 

 

 

 

 

 

螢幕快照 2014 02 27 下午8 51 41

 

Tab Bar Navigation Controllers with Storyboards

Video : https://vimeo.com/53563148

 

 

 

 

 

 

 

iOS Development Tutorial – Series
….. Using a Tab Bar Controller with two view
http://www.youtube.com/watch?v=B3_8rAbxoiY&list=PL4E61E23CD4B49974&feature=c4-overview-vl

螢幕快照 2014 02 28 上午10 38 33

 

 

 

Categories
Programming/iOS

[iOS] Custom Table view cell / UITableView example

螢幕快照 2014 02 26 下午5 49 23