Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Objective-C Introduction part1
Search
Juan Pablo Ortiz Aréchiga
March 24, 2012
Programming
180
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Objective-C Introduction part1
An extended -barely- version of the Objective-C introduction at CocoaHeadsGDL.
Juan Pablo Ortiz Aréchiga
March 24, 2012
More Decks by Juan Pablo Ortiz Aréchiga
See All by Juan Pablo Ortiz Aréchiga
Introduction to programming
pablasso
1
86
Objective-C Introduction part2
pablasso
3
160
Objective-C at CocoaHeadsGDL
pablasso
1
130
Other Decks in Programming
See All in Programming
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
ActionController meets Protocol Buffers
sorah
0
680
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
330
Railsバージョンを4倍にした話
optim
0
550
sbt 2.0: takeoff
eed3si9n
0
170
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
820
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
170
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
150
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1.2k
Performance Optimization With LLMs
xleitix
0
200
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
120
GraphQL の onError と Nullability のこれから
quramy
0
180
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
41k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.3k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
Navigating Team Friction
lara
192
16k
4 Signs Your Business is Dying
shpigford
187
23k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
490
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Transcript
Objective-C intro viernes 23 de marzo de 12
History • Born in the 80’s by Brad Cox and
Tom Love • A C’s pre-processor • C + Smalltalk = Obj-C • Not really popular viernes 23 de marzo de 12
NeXT! viernes 23 de marzo de 12
• NeXT was a failure on hardware, but success on
building tools • GNU cloned the compiler in the 90s • Apple buys NeXT, relies Objective-C and NeXT tools viernes 23 de marzo de 12
Objective-C • Bunch of C extensions • You can write
plain C without problems • Interfaces (.h) and implementations (.m) viernes 23 de marzo de 12
Objective-C • Dynamic typing (id) viernes 23 de marzo de
12
Method syntax viernes 23 de marzo de 12
In Objective-C style: viernes 23 de marzo de 12
multiparameters viernes 23 de marzo de 12
Accessors the properties way the manual way viernes 23 de
marzo de 12
Properties instead of this.. viernes 23 de marzo de 12
Properties .. this setters/getters are created for you viernes 23
de marzo de 12
Properties set synthesize on the implementation avoids clutter viernes 23
de marzo de 12
Properties • nonatomic • atomic • retain • copy •
assign viernes 23 de marzo de 12
Memory management • It’s all up to you * viernes
23 de marzo de 12
Memory management reference counting viernes 23 de marzo de 12
Creating objects or autorelease Everytime you use init or retain,
it’s your responsability to release viernes 23 de marzo de 12
Memory management viernes 23 de marzo de 12
Interface 1 2 3 viernes 23 de marzo de 12
Implementation setters viernes 23 de marzo de 12
Implementation setters viernes 23 de marzo de 12
Implementation viernes 23 de marzo de 12
3 ways to handle memory • Manual reference counting •
Garbage collector* (only on Mac) • ARC viernes 23 de marzo de 12
ARC viernes 23 de marzo de 12
ARC • Memory Management? that’s so 2011 • Automatic Reference
Counting • Xcode 4.2+ • Compatible with iOS 4.x* and iOS 5.x viernes 23 de marzo de 12
Properties + ARC • atomic • nonatomic • weak •
strong viernes 23 de marzo de 12
Debug with NSLog same rules as printf() viernes 23 de
marzo de 12
nil every message sent to nil will be ignored, the
app won’t crash viernes 23 de marzo de 12
Categories add methods to an existing class without subclassing viernes
23 de marzo de 12
Categories Once imported, the category can be used on any
NSString viernes 23 de marzo de 12
Protocols • Declare methods that others are expected to implement
viernes 23 de marzo de 12
Delegate Pattern • Handing a task to another part of
the program. • i.e. a TableView may notify it’s delegate when a single row was tapped so the program can take an action. viernes 23 de marzo de 12
Coding Standards viernes 23 de marzo de 12
Coding Standards viernes 23 de marzo de 12
Coding Standards viernes 23 de marzo de 12