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
46
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
63
Migrating to Swift 3
sergioutama
0
54
10 Things I learned while freelancing
sergioutama
0
58
iOS Video Player
sergioutama
0
81
Tribute to Mantle
sergioutama
0
29
Mobile Analytics
sergioutama
0
45
Other Decks in Programming
See All in Programming
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
860
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
470
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.6k
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
120
print("Hello, World")
eddie
2
530
OSS開発者という働き方
andpad
5
1.7k
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
120
複雑なドメインに挑む.pdf
yukisakai1225
5
1.2k
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
600
はじめてのMaterial3 Expressive
ym223
2
740
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
310
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
54
11k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Writing Fast Ruby
sferik
628
62k
Why Our Code Smells
bkeepers
PRO
339
57k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Agile that works and the tools we love
rasmusluckow
330
21k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
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