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
47
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
83
Tribute to Mantle
sergioutama
0
29
Mobile Analytics
sergioutama
0
46
Other Decks in Programming
See All in Programming
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
340
CSC305 Lecture 04
javiergs
PRO
0
270
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
210
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
640
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
12
4.6k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
400
オープンソースソフトウェアへの解像度🔬
utam0k
16
3k
Six and a half ridiculous things to do with Quarkus
hollycummins
0
180
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
5.1k
Le côté obscur des IA génératives
pascallemerrer
0
150
What's new in Spring Modulith?
olivergierke
1
160
技術的負債の正体を知って向き合う
irof
0
180
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
Scaling GitHub
holman
463
140k
Docker and Python
trallard
46
3.6k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
35
6.1k
Designing for humans not robots
tammielis
254
26k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Unsuck your backbone
ammeep
671
58k
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