Start a Project

Customize default image cell in UITableView in IOS.

Set Image size in cell

 

UITableView provides default functionality  for adding an image in the cell  but it will  take the size of the image according to their row size and difficult to adjust their size according to our need . if we are taking customize UITableView then it is easy but if we are using their default feature to add an image then it will create a problem.

Steps you have to follow:

1: Delegate function of UITable where you are adding an image in the cell, write this code…

This is the code snippet.  the actual function is.  ex:-( 40 x 40)

 

2: Define that function in same class.

 

3: Now you can manage your image according to need like 30×30,20×20 …. etc.

 

 

 

 

Exit mobile version