Submit Search
Upload
Webエンジニアから見たiOS5
•
3 likes
•
1,353 views
Satoshi Asano
Follow
JavaScript化するObjective-Cについて
Read less
Read more
Technology
Design
Report
Share
Report
Share
1 of 23
Download now
Download to read offline
Recommended
OneRing @ OSCamp 2010
OneRing @ OSCamp 2010
Qiangning Hong
Everybody Loves AFNetworking ... and So Can you!
Everybody Loves AFNetworking ... and So Can you!
jeffsoto
Javascript call ObjC
Javascript call ObjC
Lin Luxiang
Annotation processing and code gen
Annotation processing and code gen
koji lin
Working with AFNetworking
Working with AFNetworking
waynehartman
New Design of OneRing
New Design of OneRing
Qiangning Hong
Using Logstash, elasticsearch & kibana
Using Logstash, elasticsearch & kibana
Alejandro E Brito Monedero
React for Beginners
React for Beginners
Derek Willian Stavis
Recommended
OneRing @ OSCamp 2010
OneRing @ OSCamp 2010
Qiangning Hong
Everybody Loves AFNetworking ... and So Can you!
Everybody Loves AFNetworking ... and So Can you!
jeffsoto
Javascript call ObjC
Javascript call ObjC
Lin Luxiang
Annotation processing and code gen
Annotation processing and code gen
koji lin
Working with AFNetworking
Working with AFNetworking
waynehartman
New Design of OneRing
New Design of OneRing
Qiangning Hong
Using Logstash, elasticsearch & kibana
Using Logstash, elasticsearch & kibana
Alejandro E Brito Monedero
React for Beginners
React for Beginners
Derek Willian Stavis
Fast C++ Web Servers
Fast C++ Web Servers
Troy Miles
Logstash-Elasticsearch-Kibana
Logstash-Elasticsearch-Kibana
dknx01
Java Play RESTful ebean
Java Play RESTful ebean
Faren faren
MongoDB: tips, trick and hacks
MongoDB: tips, trick and hacks
Scott Hernandez
Java Play Restful JPA
Java Play Restful JPA
Faren faren
Introduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoa
Florent Pillet
Node.js - Best practices
Node.js - Best practices
Felix Geisendörfer
Solr Indexing and Analysis Tricks
Solr Indexing and Analysis Tricks
Erik Hatcher
Nginx-lua
Nginx-lua
Дэв Тим Афс
Dockercompose
Dockercompose
Rory Preddy
Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015
Jiayun Zhou
Elk stack
Elk stack
Jilles van Gurp
Scripting GeoServer
Scripting GeoServer
Jared Erickson
openstack源码分析(1)
openstack源码分析(1)
cannium
Debugging and Testing ES Systems
Debugging and Testing ES Systems
Chris Birchall
MySQL in Go - Golang NE July 2015
MySQL in Go - Golang NE July 2015
Mark Hemmings
How to create a libcloud driver from scratch
How to create a libcloud driver from scratch
Mike Muzurakis
How to create a libcloud driver from scratch
How to create a libcloud driver from scratch
Mist.io
Exploring Clojurescript
Exploring Clojurescript
Luke Donnet
Go database/sql
Go database/sql
Artem Kovardin
GitHub活動を通して個人のキャリアを積みつつ仕事の成果を出す方法
GitHub活動を通して個人のキャリアを積みつつ仕事の成果を出す方法
Satoshi Asano
集合知プログラミング第2章復習
集合知プログラミング第2章復習
Satoshi Asano
More Related Content
What's hot
Fast C++ Web Servers
Fast C++ Web Servers
Troy Miles
Logstash-Elasticsearch-Kibana
Logstash-Elasticsearch-Kibana
dknx01
Java Play RESTful ebean
Java Play RESTful ebean
Faren faren
MongoDB: tips, trick and hacks
MongoDB: tips, trick and hacks
Scott Hernandez
Java Play Restful JPA
Java Play Restful JPA
Faren faren
Introduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoa
Florent Pillet
Node.js - Best practices
Node.js - Best practices
Felix Geisendörfer
Solr Indexing and Analysis Tricks
Solr Indexing and Analysis Tricks
Erik Hatcher
Nginx-lua
Nginx-lua
Дэв Тим Афс
Dockercompose
Dockercompose
Rory Preddy
Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015
Jiayun Zhou
Elk stack
Elk stack
Jilles van Gurp
Scripting GeoServer
Scripting GeoServer
Jared Erickson
openstack源码分析(1)
openstack源码分析(1)
cannium
Debugging and Testing ES Systems
Debugging and Testing ES Systems
Chris Birchall
MySQL in Go - Golang NE July 2015
MySQL in Go - Golang NE July 2015
Mark Hemmings
How to create a libcloud driver from scratch
How to create a libcloud driver from scratch
Mike Muzurakis
How to create a libcloud driver from scratch
How to create a libcloud driver from scratch
Mist.io
Exploring Clojurescript
Exploring Clojurescript
Luke Donnet
Go database/sql
Go database/sql
Artem Kovardin
What's hot
(20)
Fast C++ Web Servers
Fast C++ Web Servers
Logstash-Elasticsearch-Kibana
Logstash-Elasticsearch-Kibana
Java Play RESTful ebean
Java Play RESTful ebean
MongoDB: tips, trick and hacks
MongoDB: tips, trick and hacks
Java Play Restful JPA
Java Play Restful JPA
Introduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoa
Node.js - Best practices
Node.js - Best practices
Solr Indexing and Analysis Tricks
Solr Indexing and Analysis Tricks
Nginx-lua
Nginx-lua
Dockercompose
Dockercompose
Akka Cluster in Java - JCConf 2015
Akka Cluster in Java - JCConf 2015
Elk stack
Elk stack
Scripting GeoServer
Scripting GeoServer
openstack源码分析(1)
openstack源码分析(1)
Debugging and Testing ES Systems
Debugging and Testing ES Systems
MySQL in Go - Golang NE July 2015
MySQL in Go - Golang NE July 2015
How to create a libcloud driver from scratch
How to create a libcloud driver from scratch
How to create a libcloud driver from scratch
How to create a libcloud driver from scratch
Exploring Clojurescript
Exploring Clojurescript
Go database/sql
Go database/sql
Viewers also liked
GitHub活動を通して個人のキャリアを積みつつ仕事の成果を出す方法
GitHub活動を通して個人のキャリアを積みつつ仕事の成果を出す方法
Satoshi Asano
集合知プログラミング第2章復習
集合知プログラミング第2章復習
Satoshi Asano
インターン講義8日目「データ構造」
インターン講義8日目「データ構造」
Hatena::Engineering
財政学A(2008)
財政学A(2008)
lacucaracha_hatena
国と地方関係論(2008)
国と地方関係論(2008)
lacucaracha_hatena
Algorithm Introduction #18 B-Tree
Algorithm Introduction #18 B-Tree
Satoshi Asano
B-Tree
B-Tree
Carlos Andres Gonzalez
趣味プロダクトで楽しいコードライフワークを送る
趣味プロダクトで楽しいコードライフワークを送る
volpe_hd28v
機械学習で泣かないためのコード設計
機械学習で泣かないためのコード設計
Takahiro Kubo
Viewers also liked
(9)
GitHub活動を通して個人のキャリアを積みつつ仕事の成果を出す方法
GitHub活動を通して個人のキャリアを積みつつ仕事の成果を出す方法
集合知プログラミング第2章復習
集合知プログラミング第2章復習
インターン講義8日目「データ構造」
インターン講義8日目「データ構造」
財政学A(2008)
財政学A(2008)
国と地方関係論(2008)
国と地方関係論(2008)
Algorithm Introduction #18 B-Tree
Algorithm Introduction #18 B-Tree
B-Tree
B-Tree
趣味プロダクトで楽しいコードライフワークを送る
趣味プロダクトで楽しいコードライフワークを送る
機械学習で泣かないためのコード設計
機械学習で泣かないためのコード設計
Similar to Webエンジニアから見たiOS5
Developing iOS REST Applications
Developing iOS REST Applications
lmrei
UIWebView Tips
UIWebView Tips
Katsumi Kishikawa
Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
Whymca
iOS 2 - The practical Stuff
iOS 2 - The practical Stuff
Petr Dvorak
ARCでめちゃモテiOSプログラマー
ARCでめちゃモテiOSプログラマー
Satoshi Asano
iOS for ERREST
iOS for ERREST
WO Community
Hızlı Cocoa Geliştirme (Develop your next cocoa app faster!)
Hızlı Cocoa Geliştirme (Develop your next cocoa app faster!)
Sarp Erdag
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
Matthew Groves
Full Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQL
All Things Open
iOS5 NewStuff
iOS5 NewStuff
deenna_vargilz
Parse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & Tricks
Hector Ramos
iOS App with Parse.com as RESTful Backend
iOS App with Parse.com as RESTful Backend
Stefano Zanetti
MPD2011 | Сергей Клюев "RESTfull iOS with RestKit"
MPD2011 | Сергей Клюев "RESTfull iOS with RestKit"
ITGinGer
mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.
Oleg Shanyuk
MFF UK - Introduction to iOS
MFF UK - Introduction to iOS
Petr Dvorak
What's Parse
What's Parse
Tsutomu Ogasawara
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS Basics
Petr Dvorak
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Luigi Dell'Aquila
CouchDB on Android
CouchDB on Android
Sven Haiges
RESTfull with RestKit
RESTfull with RestKit
Taras Kalapun
Similar to Webエンジニアから見たiOS5
(20)
Developing iOS REST Applications
Developing iOS REST Applications
UIWebView Tips
UIWebView Tips
Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
iOS 2 - The practical Stuff
iOS 2 - The practical Stuff
ARCでめちゃモテiOSプログラマー
ARCでめちゃモテiOSプログラマー
iOS for ERREST
iOS for ERREST
Hızlı Cocoa Geliştirme (Develop your next cocoa app faster!)
Hızlı Cocoa Geliştirme (Develop your next cocoa app faster!)
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
Full Stack Development with Node.js and NoSQL
Full Stack Development with Node.js and NoSQL
iOS5 NewStuff
iOS5 NewStuff
Parse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & Tricks
iOS App with Parse.com as RESTful Backend
iOS App with Parse.com as RESTful Backend
MPD2011 | Сергей Клюев "RESTfull iOS with RestKit"
MPD2011 | Сергей Клюев "RESTfull iOS with RestKit"
mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.
MFF UK - Introduction to iOS
MFF UK - Introduction to iOS
What's Parse
What's Parse
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS Basics
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
CouchDB on Android
CouchDB on Android
RESTfull with RestKit
RESTfull with RestKit
More from Satoshi Asano
I phoneアプリの通信エラー処理
I phoneアプリの通信エラー処理
Satoshi Asano
iPhoneアプリとAndroidアプリを比較する〜はてなブックマーク開発の現場から〜
iPhoneアプリとAndroidアプリを比較する〜はてなブックマーク開発の現場から〜
Satoshi Asano
Google Analytics & iPhone
Google Analytics & iPhone
Satoshi Asano
iPhoneアプリ開発講座Web連携アプリ編
iPhoneアプリ開発講座Web連携アプリ編
Satoshi Asano
Asihttp requestについて
Asihttp requestについて
Satoshi Asano
バックグラウンド位置取得について
バックグラウンド位置取得について
Satoshi Asano
iPhoneアプリ開発講座入門編
iPhoneアプリ開発講座入門編
Satoshi Asano
More from Satoshi Asano
(7)
I phoneアプリの通信エラー処理
I phoneアプリの通信エラー処理
iPhoneアプリとAndroidアプリを比較する〜はてなブックマーク開発の現場から〜
iPhoneアプリとAndroidアプリを比較する〜はてなブックマーク開発の現場から〜
Google Analytics & iPhone
Google Analytics & iPhone
iPhoneアプリ開発講座Web連携アプリ編
iPhoneアプリ開発講座Web連携アプリ編
Asihttp requestについて
Asihttp requestについて
バックグラウンド位置取得について
バックグラウンド位置取得について
iPhoneアプリ開発講座入門編
iPhoneアプリ開発講座入門編
Recently uploaded
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
johnbeverley2021
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Deepika Singh
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
rafiqahmad00786416
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Dropbox
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Christopher Logan Kennedy
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
Rustici Software
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Zilliz
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Zilliz
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Nanddeep Nachan
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
apidays
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Edi Saputra
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
apidays
Recently uploaded
(20)
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Webエンジニアから見たiOS5
1.
Web
iOS 5 (id:ninjinkun / @ninjinkun)
2.
Cocoa •
10 • Next Step, Mac OSX • • >< •
3.
iOS •
iOS • • SDK • • Apple • Web
4.
•
iOS • iOS 4, iOS 5
5.
•
Objective-C JavaScript ! • iOS 5
6.
•
(Blocks) JavaScript • (GCD) • (ARC)
7.
(Blocks)
JavaScript • JavaScript • Ajax API function sendRequest (url) { var req = new XMLHttpRequest(); // req.onreadystatechange = function(){ if (req.readyState == 4) { if (req.status == 200) { console.log("success"); } } }; req.open("GET", url); req.send(); }
8.
(Blocks)
Objective-C • iOS 4 Objective-C @interface Downloader : NSObject { NSURLConnection *conn; } @end @implementation Downloader - (void)sentRequest:(NSURL *)url { NSURLRequest *req = [NSURLRequest requestWithURL:url]; // conn = [NSURLConnection connectionWithRequest:req delegate:self]; } - (void)connection:( NSURLConnection *) connection didReceiveResponse: ( NSURLResponse *) response { // delegate NSLog(@"success"); } @end
9.
(Blocks)
Objective-C • iOS 4 Objective-C @interface Downloader : NSObject { NSURLConnection *conn; } @end @implementation Downloader - (void)sentRequest:(NSURL *)url { NSURLRequest *req = [NSURLRequest requestWithURL:url]; // conn = [NSURLConnection connectionWithRequest:req delegate:self]; } - (void)connection:( NSURLConnection *) connection didReceiveResponse: ( NSURLResponse *) response { // delegate NSLog(@"success"); } @end
10.
(Blocks) iOS 4 •
(Blocks) • • SDK Blocks • void(^hogeHandler)(NSArray *) = ^(NSArray *array){ NSLog(@"hoge"); };
11.
(Blocks) @interface Downloader :
NSObject { NSOperationQueue *queue; } @end @implementation Downloader - (void)sendRequest { queue = [[NSOperationQueue alloc] init]; NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/"]]; // [NSURLConnection sendAsynchronousRequest:req queue:queue completionHandler:^(NSURLResponse *res, NSData *data, NSError *err) { if ([(NSHTTPURLResponse *)res statusCode] == 200) { // NSLog(@"success"); } }]; } @end
12.
(Blocks) @interface Downloader :
NSObject { NSOperationQueue *queue; } @end @implementation Downloader - (void)sendRequest { queue = [[NSOperationQueue alloc] init]; NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/"]]; // [NSURLConnection sendAsynchronousRequest:req queue:queue completionHandler:^(NSURLResponse *res, NSData *data, NSError *err) { if ([(NSHTTPURLResponse *)res statusCode] == 200) { // NSLog(@"success"); } }]; } @end !
13.
(GCD) JavaScript •
JavaScript • • • • iOS • • •
14.
(GCD) iOS 4 •
@interface FileReader : NSObject { NSString *fileContent; } @property (nonatomic, assign) id delegate; @end @implementation FileReader -(void)readFile:(NSString *)filename { [self performSelectorInBackground:@selector(readFileOnBackground:) withObject:filename]; } // -(void)readFileOnBackground:(NSString *)filename { NSError *err = nil; fileContent = [NSString stringWithContentsOfFile:filename encoding:NSUTF8StringEncoding error:&err]; // UI [delegate performSelectorOnMainThread:@selector(updateViewWithFile:) withObject:fileContent waitUntilDone:NO]; } @end
15.
(GCD) iOS 4 •
Grand Central Dispatch • • • • •
16.
(GCD) iOS 4 • @interface
FileReader : NSObject @property (nonatomic, assign) id delegate; @end @implementation FileReader -(void)readFile:(NSString *)filename { // dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ NSError *err = nil; NSString *fileContent = [NSString stringWithContentsOfFile:filename encoding:NSUTF8StringEncoding error:&err]; // dispatch_async(dispatch_get_main_queue(), ^{ [delegate updateViewWithFile:fileContent]; }); }); } @end
17.
(ARC) JavaScript •
GC • • Web
18.
(ARC) iOS 5
• @interface User : NSObject { NSString *name; NSString *imageUrl; } @end @implementation User -(id)initWithDictionary:(NSDictionary *)dict { self = [super init]; if (self) { name = [[dict objectForKey:@"name"] retain]; // imageUrl = [[dict objectForKey:@"image_url"] retain]; } return self; } // -(void)dealloc { [name release]; [imageUrl release]; [super dealloc]; } @end
19.
(ARC) iOS 5
• @interface User : NSObject { NSString *name; NSString *imageUrl; } @end @implementation User -(id)initWithDictionary:(NSDictionary *)dict { self = [super init]; if (self) { name = [[dict objectForKey:@"name"] retain]; // imageUrl = [[dict objectForKey:@"image_url"] retain]; } return self; } // -(void)dealloc { [name release]; [imageUrl release]; [super dealloc]; } @end
20.
(ARC) iOS 5 •
Automatic Reference Counting • • • •
21.
(ARC) iOS 5 •
! @interface User : NSObject { NSString *name; NSString *imageUrl; } @end @implementation User -(id)initWithDictionary:(NSDictionary *)dict { self = [super init]; if (self) { name = [dict objectForKey:@"name"]; imageUrl = [dict objectForKey:@"image_url"]; } return self; } // @end
22.
GC •
GC • iOS • • • CPU
23.
•
Objective-C JavaScript ! • … … • Objective-C • • iOS •
Download now