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
Sergio Utama
March 21, 2016
Programming
0
34
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
260
From try! Swift Tokyo 2017
sergioutama
0
57
Migrating to Swift 3
sergioutama
0
48
10 Things I learned while freelancing
sergioutama
0
54
iOS Video Player
sergioutama
0
65
Tribute to Mantle
sergioutama
0
25
Mobile Analytics
sergioutama
0
37
Other Decks in Programming
See All in Programming
見た目から始める生産性向上
ikumatadokoro
9
1.3k
From Spring Boot 2 to Spring Boot 3 with Java 21 and Jakarta EE
ivargrimstad
0
380
Node.js v22 で変わること
yosuke_furukawa
PRO
11
3.9k
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
2
200
Going beyond Apache Parquet's default settings
xhochy
0
120
Hanami and htmx
bkuhlmann
0
220
What We Can Learn From OSS
inouehi
0
430
Snowflakeで眠ったデータを起こそう!
estie
0
130
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
1.1k
禅の心を手に入れよ
eltociear
1
270
Milestoner
bkuhlmann
1
410
AmperとFleetを使ったAndroidアプリ
yoppie
0
240
Featured
See All Featured
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
4 Signs Your Business is Dying
shpigford
176
21k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
22
1.6k
The Cult of Friendly URLs
andyhume
74
5.7k
Agile that works and the tools we love
rasmusluckow
325
20k
How to name files
jennybc
65
93k
The Mythical Team-Month
searls
216
42k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
Designing on Purpose - Digital PM Summit 2013
jponch
111
6.5k
[RailsConf 2023] Rails as a piece of cake
palkan
27
4k
We Have a Design System, Now What?
morganepeng
44
6.8k
Unsuck your backbone
ammeep
663
57k
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