Reputation: 5555
i need to create below design
I am following this code to draw simple collection view with horizontal scroll inside a UITableView
Current sample code work like this
UITableView-> UICollectionViewCell as cell with horizontal scroll
What i want
i want : First row with UICollectionview with horizontal scroll and Then rest row with Normal UITableviewCell to show data
How can i do it .
Upvotes: 0
Views: 793
Reputation: 361
When tableview's cellForRowAtIndexPath call you can check for First section and when first section load you can create new UICollection view object load in first cell. Than next section will load you can work as normal tableview work.
Not- you need to implement UICollectionview delegate and datasource methods also.
Upvotes: 1
Reputation: 5108
UITableView
to your view controller
and implement it's delegate
and datasource
methods .(You can use UITableViewController
instead of UIViewController
).fist cell
of the first section
in your tableview
, you should use a custom tableview cell
.tableview cell
, you have to add your collection view
with horizontal scroll
, and implement its delegate
and data source
methods inside your custom tableview cell class
.these are the steps you have to do.
refer this implement uicollectionview inside uitableview question for more.
Hope this will help to you.
Upvotes: 2
Reputation:
You should design a UITableViewCell which has a UICollectionView inside, and set this cell for the cell in section A and for Section B, you should design a new UITableview cell.
Upvotes: 1