answerstu

asyncdisplaykit - How can I enforce a minimum Height for a ASDisplayNode?

I've done quite a lot of work using AsyncDisplayKit until now and I'm really really happy with it. Unfortunately now I've hit a road block.I can't get a ASButtonNode to have a minimum height (in a ASCellNode if this is important).class SmallButtonCellNode: ASCellNode { let normalSmallButton = ASButtonNode() let selectedSmallButton = ASButtonNode() init() { super.init() self.backgroundColor = UIColor.lightGrayColor() // .. button title and background configuration here .. let buttonSizeRange = ASRelativeSizeRangeMake( ...Read more

asyncdisplaykit - Control ASdisplayNode height is consistent with cell height

How do you make the control ASdisplayNode highly consistent with the cell?- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize{NSMutableArray *rightArray =[[NSMutableArray alloc]initWithObjects:_titleNode, _descNode,nil];[rightArray addObjectsFromArray:_replayNodes];ASStackLayoutSpec *verStackLayout = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionVertical spacing:8 justifyContent:ASStackLayoutJustifyContentStart alignItems:ASStackLayoutAlignItemsStart children:rightArray];verStackLayout.style.flexGrow = YES...Read more

asyncdisplaykit - AsyncDisplayKey - stacklayout doesnt shows on screen

I try to create stacklayout inside cellnode, but nothing shows on screenclass Node: ASCellNode { let blackNode = ASDisplayNode() let blueNode = ASDisplayNode() override init() { super.init() self.addSubnode(blueNode) self.addSubnode(blackNode) } override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec { blackNode.backgroundColor = .black blueNode.backgroundColor = .blue let contentStackSpec = ASStackLayoutSpec(direction: .horizontal, ...Read more

asyncdisplaykit - ASViewController<ASTableNode> show empty table

I have following controllerclass CategoriesViewController: ASViewController<ASTableNode>, CategoriesViewProtocol { override init(nibName: String?, bundle: Bundle?) { super.init(node: ASTableNode()) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() node.dataSource = self node.delegate = self }}extension CategoriesViewController: ASTableDataSource, ASTableDelegate { func tableNode(_ tableN...Read more