UITableview dynamic header height

--

Here we are going to see how to implement dynamic header height for a UITableview header based on the content of a UILabel.

Step 1: Set the section header height as UITableView.automaticDimension.

Step 2: In estimated height for header delegate assign an estimated value.

Step 3: In view for header delegate add a UILabel and apply constraints relative to the returning UIView. No frames are required for the returning UIView and the UILabel.

For queries please feel free to reach me at pratheesh_db@hotmail.com

Related:

Sign up to discover human stories that deepen your understanding of the world.

--

--

Pratheesh Bennet
Pratheesh Bennet

Written by Pratheesh Bennet

Product owner Falcon Forms (www.falconforms.app). Digitize your paperwork using Falcon Forms. Build and configure your own forms in an instant.

No responses yet

Write a response