AsyncDisplayKit icon indicating copy to clipboard operation
AsyncDisplayKit copied to clipboard

Custom flow layout did not work in ASCollectionNode ,But work in UICollectionView

Open yaxunliu opened this issue 6 years ago • 0 comments

Part of the display is not normal In ASCollectionNode: issue

Normal display should be like this: normal

Demo

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)

yaxunliu avatar Mar 28 '18 01:03 yaxunliu