Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Objective-C Introduction part1
Search
Juan Pablo Ortiz Aréchiga
March 24, 2012
Programming
5
170
Objective-C Introduction part1
An extended -barely- version of the Objective-C introduction at CocoaHeadsGDL.
Juan Pablo Ortiz Aréchiga
March 24, 2012
Tweet
Share
More Decks by Juan Pablo Ortiz Aréchiga
See All by Juan Pablo Ortiz Aréchiga
Introduction to programming
pablasso
1
73
Objective-C Introduction part2
pablasso
3
140
Objective-C at CocoaHeadsGDL
pablasso
1
120
Other Decks in Programming
See All in Programming
Team operations that are not burdened by SRE
kazatohiei
1
320
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
160
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
290
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
930
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
950
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
540
状態遷移図を書こう / Sequence Chart vs State Diagram
orgachem
PRO
1
130
AI Agent 時代のソフトウェア開発を支える AWS Cloud Development Kit (CDK)
konokenj
3
270
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
20
8.1k
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
110
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
170
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
280
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Speed Design
sergeychernyshev
32
1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Embracing the Ebb and Flow
colly
86
4.7k
Rails Girls Zürich Keynote
gr2m
95
14k
How STYLIGHT went responsive
nonsquared
100
5.6k
BBQ
matthewcrist
89
9.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Documentation Writing (for coders)
carmenintech
72
4.9k
Navigating Team Friction
lara
187
15k
Raft: Consensus for Rubyists
vanstee
140
7k
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