Read More
Read now

Manage Custom UICollection View in UITableview Cell in swift 3

Save

Custom Layout

Sometimes we have taken the multiple UICollectionView in a different cell of UITableView and each cell has a different size so for managing this thing we use autoresizing in UItableview.

for this we need to follow some steps:

1: We have to take UITableView and create their outlet like:

Now define in Viewdidload method:

2: Now register the UICollectionView and their properties in before reload call.

3: Now define the UITableViewCell class:

Note: This function manage the autoresizing of UICollectionView.

Now Define the delegate of UICollectionView:

 

In ViewdidLoad class where you have taken outlet of UITableView :

 

Now you need to set the some delegate function to run the tableview .

and whatever the value passed in UICollectionview layout ,UItableview will automatic maintain their height .

 

 

 

 

 

 

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home