Slide 23
Slide 23 text
Layout: sample code
override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec
let stackSpec = ASStackLayoutSpec(
direction: .horizontal,
spacing: 11.0,
justifyContent: .start,
alignItems: .center,
children: [self.imageNode, self.titleNode]
)
let insetSpec = ASInsetLayoutSpec(
insets: UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8),
child: stackSpec
)
print(insetSpec.asciiArtString())
return insetSpec
}