Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
294 views
in Technique[技术] by (71.8m points)

swift - CollectionView binding

I want to put the data in the collection view. This is part of my view controller code. I don't know what to put in "for:" of that code.

    func bindViewModel() {
        let input = SearchViewModel.input(loadData: loadData.asSignal(onErrorJustReturn: ()))
        let output = viewModel.transform(input)

        output.loadApplyList.map(CollectionOfOne.init).bind(to: collectionView.rx.items) { collectionView, index, element -> UICollectionViewCell in
            guard self.collectionView.dequeueReusableCell(withReuseIdentifier: "friend", for: <#IndexPath#>) is FriendCell else {
                return FriendCell()
            }
        }

    }

I used this method when I bound the table view. Should I do a different collation view?

question from:https://stackoverflow.com/questions/65931684/collectionview-binding

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...