Skip to content

Commit

Permalink
Update Playground
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Nov 15, 2017
1 parent 8ed41aa commit a799022
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Yalta.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@ class MyViewController : UIViewController {
logo.font = UIFont.systemFont(ofSize: 30)
title.font = UIFont.systemFont(ofSize: 20, weight: .bold)
subtitle.font = UIFont.systemFont(ofSize: 15)
subtitle.numberOfLines = 0

logo.text = "⛵️"
title.text = "Welcome to Yalta!"
subtitle.text = "Micro Auto Layout DSL"

let right = Stack([title, subtitle], axis: .vertical)
let stack = Stack([logo, right], spacing: 10, alignment: .top)

view.addSubview(stack)
stack.al.center.alignWithSuperview()
subtitle.text = "An intuitive and powerful Auto Layout"

let labels = Stack([title, subtitle], axis: .vertical)
let stack = Stack(logo, labels) {
$0.spacing = 10
$0.alignment = .top
}

view.addSubview(stack) {
$0.center.alignWithSuperview()
$0.edges(.left, .right).pinToSuperviewMargins(relation: .greaterThanOrEqual)
}
}
}

Expand Down

0 comments on commit a799022

Please sign in to comment.