AsyncDisplayKit
AsyncDisplayKit copied to clipboard
Custom flow layout did not work in ASCollectionNode ,But work in UICollectionView
Part of the display is not normal In ASCollectionNode:
Normal display should be like this:
ASCollectionNode :
let layout = EmojiFlowLayout()
let collecNode = ASCollectionNode(collectionViewLayout: layout)
collecNode.view.isPagingEnabled = true
collecNode.dataSource = self
collecNode.delegate = self
UICollectionView :
let collection = UICollectionView(frame: CGRect(x: 0, y: 100, width: self.view.bounds.width, height: 150), collectionViewLayout: EmojiFlowLayout())
collection.dataSource = self
collection.delegate = self
collection.isPagingEnabled = true
collection.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "UICollectionViewCell")
collection.backgroundColor = UIColor.white
view.addSubview(collection)