2 CollectionView Rows To 2 TableView Ones

Is there a way to have 2 rows from a CollectionView translate to 2 separate rows of a tableview? (I need both rows to contain separate information)
Answered by ZoneX in 654130022
I'm thinking it would be better to do a collectionview in a scrollview so things can be closer together.
What do you mean by translate to? Can you explain with more concrete examples?
Collection view rows are not a fixed property, as it may wrap items to flow between rows.

So what do you want exactly ?
Alright I have an example lets say you have a collectionview and you display just names of people, you can have 2 rows of different names but I am not sure how to have those 2 rows of the different names in a tableview.
Sorry, but your description is full of mysteries for readers.

You have a collection view and a table view, that's written in your opening post.
All you have added is only one thing -- the collection view shows names of people.
  • Where are the collection view and the table view? In a same view controller, or you have another view controller?

  • What action triggers to translate or to make the table view have those 2 rows?

  • How the 2 rows in the collection view are chosen? Or the collection view shows only 2 names?

  • Again, what is translate or have those 2 rows? What do you want to show in the table view? And what is the table view showing before translate?

  • ...

The issue I have is I had a collectionview with 2 rows of data I got from an API, but I could not scroll down (could only scroll horizontally), so I had to add a tableview and put the collectionview inside it however the issue is my 2 tableview cells show the same thing but I want them to show different data.

The issue I have is I had a collectionview with 2 rows of data I got from an API, but I could not scroll down (could only scroll horizontally), so I had to add a tableview and put the collectionview inside it however the issue is my 2 tableview cells show the same thing but I want them to show different data.

I would write some comments when you could show enough explanation for me. Hope you can solve your issue soon. Good luck.
Accepted Answer
I'm thinking it would be better to do a collectionview in a scrollview so things can be closer together.

I'm thinking it would be better to do a collectionview in a scrollview so things can be closer together.

CollectionView is already a scrollView
Code Block
class UICollectionView : UIScrollView

So what you did is not clear. Not more than the questions and the following explanations.
But if you're ok with it, good for your.

Just a last request: when you post a question on the forum, try to explain clearly what the problem or the intent is.

Have a good day.
2 CollectionView Rows To 2 TableView Ones
 
 
Q