Closed api42 closed 6 years ago
@apurva2342: I'd recommend first creating a SwipeableView outside of collection view, once you have that working then try putting it into a collectionView.
That way you can further isolate where the problem actually is: simply with using the swipeable view, or the interaction b/w the collection view & swipeable view
I don't think that's the issue. The issue is I get the views but not the data.
I'm probably making a very noob mistake.
in my collectionveiw controller This is what I usually do.
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: postCellId, for: indexPath) as! PostUi
cell.post = posts[indexPath.item]
cell.delegate = self
return cell
}
But no idea how to use your classes with this. How to correctly dequeue cell and populate those cards?
What are you trying to achieve? Just one stack of cards? Or many stacks of cards? If you're just trying to get one card, you dont need to use collectionView at all. Look at the demo and it has an example
No. It's many stack of cards.
start by creating one stack of cards in a UIView, then embed that UIView inside the UICollectionViewCell (in your case the class you've named PostUi
)
Closing due to inactivity
Just started using it. It works really good. But here is an issue I'm facing.
I'm using uicollectiionview.
I did all the setup required.
in my controller file
This, of course, loads the UI from mycollectionview but without data. Obviously, I'm doing something wrong.
This is somewhat how mycollectionview looks like