Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
In Most of time we use the collection view inside the table view cell if the collection view flow is vertical then we need to increase the height of table view cell or if flow layout is horizontal then we fix some constant height for table view cell .
Here I am discussing about how to manage the table view cell height automatically if collection view flow layout is vertical
Follow the Steps:
1: Go to Table view Cell class & create the outlet of collection view & collection view Height Constraints.
2: Now Register the Collection view cell so we can use .
3: Now write their All delegate & data source method inside the table view cell class.
4: Now the Collection View delegate & data source are set , now move to Table View Delegate & Data source.
5: Now register the tableview cell
6: After register the Tableview Cell & we have to define their delegate & Data source.
7: Now its Time to return the cell , here i am creating the vertical flow of collection view where the collection view height is fixed, so its automatically increase the table view cell size.
8 Notes : these are the important part to automate your table view cell
cell.frame = tableView.bounds
cell.layoutIfNeeded()
cell.prodcutCollectionView.reloadData()
cell.productCollectionViewHeight.constant = cell.prodcutCollectionView.collectionViewLayout.collectionViewContentSize.height
9: Now your Table View Cell automatically increase without calculating the height of each collection view.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Excellent work, fast, good quality and understood the brief perfectly! Quick responses developing the project and very good cooperation. I suggest to anyone.
Stathis Plakidas
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.