Created
May 28, 2019 08:01
-
-
Save GeekTree0101/cc5ec9f5cd3780460cca82872c69f3ef to your computer and use it in GitHub Desktop.
Case B
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
class CellNode: ASCellNode { | |
let contentNode = ASDisplayNode() | |
override init() { | |
super.init() | |
self.ASM = true | |
self.contentNode.ASM = true | |
self.contentNode.layoutSpecBlock = { [unowned self] _ -> ASLayoutSpec in | |
return self.contentLayoutSpec() | |
} | |
} | |
override func layoutSpecThatFits() -> ASLayoutSpec { | |
return ASInsetLayoutSpec(insets: .zero, child: contentNode) | |
} | |
func contentLayoutSpec() -> ASLayoutSpec { | |
return ASLayoutSpec() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment