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
Parus
Search
DAloG
November 23, 2013
Programming
210
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Parus
Auto Layout in code.
DAloG
November 23, 2013
More Decks by DAloG
See All by DAloG
State normalization (RU)
dalog
0
260
Redux + MQTT
dalog
1
840
От задач к проблемам
dalog
1
290
Unlimited power of Data-Driven UI
dalog
4
720
Data-Driven View Controllers. Tips and Tricks
dalog
5
2k
2 years of Redux in iOS. Lessons learned
dalog
0
430
Why unidirectional architecture matter for iOS.
dalog
1
340
Mobile backend without REST
dalog
2
160
Self managed teams 101
dalog
0
210
Other Decks in Programming
See All in Programming
golang-bob.pdf
iwatsukayura
0
130
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
1.2k
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
sbt 2.0: takeoff
eed3si9n
0
160
ジョジョの世界をXRで再現する
mofurune
0
160
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
Workers Cache を知る
syumai
0
360
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Paper Plane
katiecoart
PRO
5
54k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Odyssey Design
rkendrick25
PRO
2
870
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
620
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Embracing the Ebb and Flow
colly
88
5.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Optimizing for Happiness
mojombo
378
71k
Transcript
Parus Mastering Auto Layout in code UAMobile - 2013 by
DAloG
Intro UI Parts AL in general XIBs Parus
What is UI?
What is UI? Structure Layout Content
UI Components Structure Layout Content
Layout in the Wonderland
What if… Layout is intuitive Layout is simple Layout is
visual
What if… Layout is declarative Layout is compact
What we have?
XIBs Visual Intuitive Simple
XIBs Repetitive Static Unclear
Frames Controllable Powerful Clear
Frames Hard Verbose Static
Auto Layout
Relative Declarative Simple
A1 = A2 *m + c
A1 = A2 *m + c Left Right Top Bottom
CenterX/Y Baseline Width Height
Cassowary Will solve all your constraints
Cassowary Partial calculation Ambiguity detection Confilct detection
Ambiguity
Conflicts
AL in XIBs No conflicts No ambiguity No agility No
decarative.
AL in Code Verbose Not readable Mess Control.
None
Raw NSConstraint API ASCI VFL API XIB API
Masonry Chainable and declarative https:/ /github.com/cloudkite/Masonry
Masonry example
Summary Only raw api support. Custom syntax NIH (Not Invented
Here)
Raw NSConstraint API Masonry API ???
None
Parus DSL for NSConstraint creation https:/ /github.com/DAlOG/Parus
DSL Domain Specific Language.
Raw NSConstraint API ASCI VFL API
PV API PVVFL API PVGroup API
PV API Direct map.
A1 = A2 *m + c
None
A1 PV<Attr>Of(UIView* view) PVLeftOf(v) PVWidthOf(v) …
= .equal. .moreThan. .lessThan.
A2 .<Attr>Of(UIView* view) .leftOf(self) .rightOf(self) …
*m .multipliedTo(2.5) multipliedTo
+ b .plus(20) .minus(50) multipliedTo
A1 = A2 *m + c
None
PV API PVVFL API PVGroup API
PV API PVVFL API PVGroup API
PVVFL Direct map.
None
None
None
PV API PVVFL API PVGroup API
PVGroup C-C-C-Composition!
PVGroup( ). PVAttribute PVVFL NSLayoutConstraint Array of constraints Metrics, Views
None
PV API PVVFL API PVGroup API
Some stats)
Questions? Feel free to contact: nobidon (Skype) +АлекейДемедецкий (Google+) @DAlooG
(Twitter)