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
76
Objective-C Introduction part2
pablasso
3
140
Objective-C at CocoaHeadsGDL
pablasso
1
130
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
Architectural Extensions
denyspoltorak
0
270
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
17
6.1k
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
AgentCoreとHuman in the Loop
har1101
5
220
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
220
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.9k
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
390
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
130
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Docker and Python
trallard
47
3.7k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
400
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
110
Automating Front-end Workflow
addyosmani
1371
200k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
For a Future-Friendly Web
brad_frost
182
10k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
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