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 light
Search
DAloG
November 27, 2013
Programming
85
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Parus light
Light version of Parus presentation.
DAloG
November 27, 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
Event is what happens
moro
2
770
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
4
3.5k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
ChromeでローカルLLM
ryu1013
0
140
golang-bob.pdf
iwatsukayura
0
130
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
How GitHub (no longer) Works
holman
316
150k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Fireside Chat
paigeccino
43
4.1k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
Six Lessons from altMBA
skipperchong
29
4.5k
Transcript
None
Parus Mastering Auto Layout in code Dev-Pro TechTalk - 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
PV API Direct map.
A1 = A2*m + c
PV API A1 = A2*m + c
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) pliedTo
+ b • .plus(20) • .minus(50) pliedTo
A1 = A2*m + c
PV API A1 = A2*m + c
PV API PVVFL API PVGroup
PV API PVVFL API PVGroup
PVVFL Direct map.
PV API A1 = A2*m + c
PV API A1 = A2*m + c
PV API A1 = A2*m + c
PV API PVVFL API PVGroup
PVGroup C-C-C-Composition!
PVGroup( ). PVAttribute PVVFL NSLayoutConstraint Array of constraints Metrics, Views
None
PV API PVVFL API PVGroup
Some stats)
Questions? Feel free to contact: nobidon (Skype) +АлексейДемедецкий (Google+) @DAlooG
(Twitter) https://speakerdeck.com/dalog/parus-light