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
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
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
CSC307 Lecture 05
javiergs
PRO
0
500
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
高速開発のためのコード整理術
sutetotanuki
1
400
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
Implementation Patterns
denyspoltorak
0
290
SourceGeneratorのススメ
htkym
0
200
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
290
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
78
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
From π to Pie charts
rasagy
0
120
Balancing Empowerment & Direction
lara
5
890
Building Applications with DynamoDB
mza
96
6.9k
A designer walks into a library…
pauljervisheath
210
24k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
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