This file contains 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 mainStack = ASStackLayoutSpec(direction: .horizontal, | |
spacing: 6, justifyContent: .start, | |
alignItems: .center, | |
children: [self.titleNode, self.subtitleNode]) | |
let padding = ASInsetLayoutSpec(insets: UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15), child: mainStack) | |
return padding |
This file contains 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 mainStack = ASStackLayoutSpec(direction: .horizontal, | |
spacing: 6.0, | |
justifyContent: .start, | |
alignItems: .center, | |
children: [titleNode, subtitleNode]) | |
return mainStack |
This file contains 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
node.layoutSpecBlock = {_,_ in | |
return ASWrapperLayoutSpec(layoutElement: self.titleNode) | |
} |
This file contains 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
class ViewController: ASViewController<ASDisplayNode> { | |
init() { | |
super.init(node: ASDisplayNode()) | |
self.node.backgroundColor = .white | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") |
NewerOlder