Skip to content

Instantly share code, notes, and snippets.

@GeekTree0101
Created May 1, 2018 15:30
Show Gist options
  • Save GeekTree0101/ae12daffc253368a3271abac8b347e86 to your computer and use it in GitHub Desktop.
Save GeekTree0101/ae12daffc253368a3271abac8b347e86 to your computer and use it in GitHub Desktop.
MessageBalloonNode property
lazy var profileNode: ASNetworkImageNode = {
let node = ASNetworkImageNode()
...
return node
}()
lazy var usernameNode: ASTextNode = {
let node = ASTextNode()
...
return node
}()
lazy var timeAgoNode: ASTextNode = {
let node = ASTextNode()
...
return node
}()
lazy var contentNode: ASTextNode = {
let node = ASTextNode()
...
return node
}()
lazy var mediaNode: XImageNode = {
let node = XImageNode(.image, screenType: .talk)
...
return node
}()
lazy var talkTailNode: ASImageNode = {
let node = ASImageNode()
...
return node
}()
lazy var contentAreaNode: ASDisplayNode = {
let node = ASDisplayNode()
...
node.layoutSpecBlock = { [weak self] (_, constrainedSize) -> ASLayoutSpec in
return self?.contentAreaLayoutSpec(constrainedSize) ?? ASLayoutSpec()
}
node.automaticallyManagesSubnodes = true
return node
}()
lazy var engageNode: TalkBalloonLikeNode = {
let node = TalkBalloonLikeNode()
...
return node
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment