Last active
May 12, 2018 04:54
-
-
Save GeekTree0101/3ca790d2d9a1aa1e0796bcbcb9eee8af to your computer and use it in GitHub Desktop.
Sana Info CellNode Example 2
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
override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec { | |
let stackLayout = | |
ASStackLayoutSpec(direction: .horizontal, | |
spacing: 10.0, | |
justifyContent: .start, | |
alignItems: .center, | |
children: [profileImageNode, | |
descriptionNode]) | |
stackLayout.style.flexShrink = 1.0 | |
let stackLayout2 = | |
ASStackLayoutSpec(direction: .horizontal, | |
spacing: 10.0, | |
justifyContent: .spaceBetween, | |
alignItems: .center, | |
children: [stackLayout, | |
buttonNode]) | |
let insets: UIEdgeInsets = .init(top: 10.0, | |
left: 15.0, | |
bottom: 10.0, | |
right: 15.0) | |
return ASInsetLayoutSpec(insets: insets, | |
child: stackLayout2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment