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
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
120
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
42k
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
180
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
560
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
610
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
3
150
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
200
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
200
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
440
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
140
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
180
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
110
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
We Are The Robots
honzajavorek
0
160
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Fireside Chat
paigeccino
41
3.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
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