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
『リコリス・リコイル』に学ぶ!! 〜キャリア戦略における計画的偶発性理論と変わる勇気の重要性〜
wanko_it
1
520
kiroでゲームを作ってみた
iriikeita
0
160
Terraform やるなら公式スタイルガイドを読もう 〜重要項目 10選〜
hiyanger
13
3.1k
A Gopher's Guide to Vibe Coding
danicat
0
140
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
600
自作OSでDOOMを動かしてみた
zakki0925224
1
1.3k
AIのメモリー
watany
13
1.4k
React 使いじゃなくても知っておきたい教養としての React
oukayuka
18
5.7k
MCPで実現できる、Webサービス利用体験について
syumai
7
2.5k
プロダクトという一杯を作る - プロダクトチームが味の責任を持つまでの煮込み奮闘記
hiliteeternal
0
460
あのころの iPod を どうにか再生させたい
orumin
2
2.4k
Claude Code と OpenAI o3 で メタデータ情報を作る
laket
0
130
Featured
See All Featured
Designing for Performance
lara
610
69k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.4k
Building Applications with DynamoDB
mza
96
6.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Optimizing for Happiness
mojombo
379
70k
4 Signs Your Business is Dying
shpigford
184
22k
BBQ
matthewcrist
89
9.8k
Writing Fast Ruby
sferik
628
62k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
460
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
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