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
Taming AutoLayout
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sergio Utama
March 21, 2016
Programming
0
48
Taming AutoLayout
Initially presented during MyCocoaheads (
https://www.facebook.com/groups/mycocoaheads/
) meetup
Sergio Utama
March 21, 2016
Tweet
Share
More Decks by Sergio Utama
See All by Sergio Utama
Easy Way to Improve ReactNative
sergioutama
0
270
From try! Swift Tokyo 2017
sergioutama
0
64
Migrating to Swift 3
sergioutama
0
55
10 Things I learned while freelancing
sergioutama
0
59
iOS Video Player
sergioutama
0
90
Tribute to Mantle
sergioutama
0
30
Mobile Analytics
sergioutama
0
46
Other Decks in Programming
See All in Programming
CSC307 Lecture 03
javiergs
PRO
1
490
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
580
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
SourceGeneratorのススメ
htkym
0
200
ぼくの開発環境2026
yuzneri
0
230
Fluid Templating in TYPO3 14
s2b
0
130
Oxlint JS plugins
kazupon
1
960
今から始めるClaude Code超入門
448jp
8
8.8k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
From π to Pie charts
rasagy
0
120
Designing for humans not robots
tammielis
254
26k
Become a Pro
speakerdeck
PRO
31
5.8k
Done Done
chrislema
186
16k
Why Our Code Smells
bkeepers
PRO
340
58k
RailsConf 2023
tenderlove
30
1.3k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
66
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
Taming AutoLayout @sergioutama
Thinking Constraint “ It’s relationship between one view with another
“
Center Y Center X height width baseline leading trailing top
bottom A
Autolayout Component Priority Hugging and Compression
AutoLayout Frame ♥
view.translatesAutoresizingMaskIntoConstraints Follow the rules setNeedsUpdateConstraints() layoutSubviews() viewdidLayoutSubviews() autoresize layout pass
setNeedsLayout() => super.setNeedsLayout()
Follow the rules “ superview only change it’s direct subviews
“
Debug Autolayout ensure x, y, & size ensure priority set
constraint identifier set view accessibility identifier
DEMO
Reference wwdc2015/218 wwdc2015/219 Apple AutoLayout Programming Guide
QA
Thank you @sergioutama