Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Intermediate Auto Layout
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Peter Stuart
December 12, 2013
Technology
330
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Intermediate Auto Layout
Talk given at CocoaHeads Boston.
Peter Stuart
December 12, 2013
Other Decks in Technology
See All in Technology
手を動かして実感する、Kiro が変える開発体験
inariku
0
350
AIに会社の文脈を理解させる技術~上流工程・非エンジニアにも広げるハーネスエンジニアリング実践~
ochtum
0
100
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
130
Mastering Agentic Development: Harness Engineering for Effective Coding Agents
konippi
3
570
AIに書かせて、プラットフォームで縛る ― EKSプラットフォームで実践した責任境界と権限設計
elmodev09
0
580
AIエージェントの一手は 誰も見ていない - Falco拡張OSS「Prempti」とeBPFで サーバーレス実行基盤を二層防御する
keitah
1
580
覗いてみよう 関数型ビジュアル言語×2Dグラフィックスの世界
yohyamasaki
0
110
あけおめLINE 傾向とその対策
nasa9084
0
330
エージェントはローカル、検証はMicroVM — Lambda MicroVMsでつくるServerless CI
fujioka6789
3
800
HolmesGPTで始めるSREエージェント入門!プラットフォームの障害調査はAIにお任せ 〜
sanghyuk
0
160
Datadog で始める トークンセーフティなAI 導⼊と定着
vkbaba
1
100
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
150
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
340
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Un-Boring Meetings
codingconduct
0
430
WCS-LA-2024
lcolladotor
0
830
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
330
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
From π to Pie charts
rasagy
1
380
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
700
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
BBQ
matthewcrist
89
10k
The Curious Case for Waylosing
cassininazir
1
540
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