Created
January 11, 2018 09:32
-
-
Save marcorei/e81fccb33ae2da876d45f3916be2ab74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let actionBar = [ | |
actionLabel, | |
optionsLabel.layoutGravitating(to: .right)] | |
.layoutAsFrame() | |
.layoutMatchingParentWidth() | |
let posterDetails = [ | |
posterNameLabel, | |
posterHeadlineLabel, | |
posterTimeLabel] | |
.layoutLinearly(orientation: .vertical, spacing: 5) | |
let posterCard = [ | |
posterImageView | |
.layoutGravitating(to: .centerY), | |
posterDetails] | |
.layoutLinearly(orientation: .horizontal) | |
let ctaBar = [ | |
likeLabel, | |
commentLabel | |
.layoutGravitating(to: .centerX), | |
shareLabel | |
.layoutGravitating(to: .right)] | |
.layoutAsFrame() | |
.layoutMatchingParentWidth() | |
let actorBar = [ | |
actorImageView, | |
actorCommentLabel] | |
.layoutLinearly(orientation: .vertical) | |
layout = [ | |
actionBar, | |
posterCard, | |
posterCommentLabel, | |
contentImageView | |
.layoutMatchingParentWidth(), | |
contentTitleLabel, | |
contentDomainLabel, | |
ctaBar, | |
actorBar] | |
.layoutLinearly(orientation: .vertical, bayaMargins: UIEdgeInsets(top: 6, left: 8, bottom: 6, right: 8)) | |
.layoutMatchingParentWidth() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment