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
Intermediate Auto Layout
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Peter Stuart
December 12, 2013
Technology
0
310
Intermediate Auto Layout
Talk given at CocoaHeads Boston.
Peter Stuart
December 12, 2013
Tweet
Share
Other Decks in Technology
See All in Technology
TypeScript 7.0の現在地と備え方
uhyo
7
1.3k
AI時代のSaaSとETL
shoe116
1
170
[JAWSDAYS2026]Who is responsible for IAM
mizukibbb
0
770
楽しく学ぼう!ネットワーク入門
shotashiratori
4
3.4k
AIエージェント、 社内展開の前に知っておきたいこと
oracle4engineer
PRO
2
140
プラットフォームエンジニアリングはAI時代の開発者をどう救うのか
jacopen
6
3.6k
Claude Code のコード品質がばらつくので AI に品質保証させる仕組みを作った話 / A story about building a mechanism to have AI ensure quality, because the code quality from Claude Code was inconsistent
nrslib
12
8.4k
マルチアカウント環境でSecurity Hubの運用!導入の苦労とポイント / JAWS DAYS 2026
genda
0
790
Postman v12 で変わる API開発ワークフロー (Postman v12 アップデート) / New API development workflow with Postman v12
yokawasa
0
130
実践 Datadog MCP Server
nulabinc
PRO
2
230
Tebiki Engineering Team Deck
tebiki
0
27k
AWS DevOps Agent vs SRE俺 / AWS DevOps Agent vs me, the SRE
sms_tech
3
880
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
180
4 Signs Your Business is Dying
shpigford
187
22k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The untapped power of vector embeddings
frankvandijk
2
1.6k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
53k
The Invisible Side of Design
smashingmag
302
51k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
210
Transcript
Intermediate Auto Layout
Layout Guides
Layout Guides id topLayoutGuide = self.topLayoutGuide; NSDictionary *views = NSDictionaryOfVariableBindings(topLayoutGuide,
someView); ... @"V:[topLayoutGuide]-[someView]" ...
Scroll Views
Scroll Views
Scroll Views [NSLayoutConstraint constraintWithItem:container attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:scrollView attribute:NSLayoutAttributeWidth multiplier:1 constant:0];
Scroll Views - (void)keyboardWillShow:(NSNotification *)notification { CGFloat offset = ...;
self.bottomConstraint.constant = offset; [UIView animate...:^{ [self.view layoutIfNeeded]; }]; }
Custom Views • Should know their intrinsic size • constraints
• intrinsicContentSize
Custom Views • Should know how to be laid out
• alignmentRectInsets
Custom Views return UIEdgeInsetsMake(25, 0, 0, 25); 1
Compression Resistance This is some pretty long text. Low High
High
Compression Resistance This is some … Low High High
Compression Resistance [view setContentCompressionResistancePriority:UILayoutPriorityDefaultLow forOrientation:UILayoutConstraintOrientationHorizontal];
Hugging Text Text Low High High Text
Hugging Text Text Low High High Text
Hugging [view setContentHuggingPriority:UILayoutPriorityDefaultLow forOrientation:UILayoutConstraintOrientationHorizontal] ;
Misc. • Align views/controls that contain text using NSLayoutAttributeBaseline, not
NSLayoutAttributeCenterY • Manage constraints with views, not view controllers • Avoid using explicit sizes