Skip to content

Instantly share code, notes, and snippets.

@GeekTree0101
Created May 1, 2018 15:49
Show Gist options
  • Save GeekTree0101/781cd0cdee490dd09fade911f7364e17 to your computer and use it in GitHub Desktop.
Save GeekTree0101/781cd0cdee490dd09fade911f7364e17 to your computer and use it in GitHub Desktop.
Message Balloon Node Talk Tail Example
lazy var talkTailNode: ASImageNode = {
let node = ASImageNode()
node.style.preferredSize = Const.talkTailSize
node.style.layoutPosition = Const.talkTailPosition
switch self.location {
case .left:
node.image = #imageLiteral(resourceName: "imgReplyLeftpoint")
case .right, .write:
node.image = #imageLiteral(resourceName: "imgReplyRightpoint")
case .admin:
node.image = #imageLiteral(resourceName: "imgStarttalkLeftpoint")
}
return node
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment