In the previous demos, we saw that all the cells have the static cell height that can be configured from the storyboard. In this section, we will learn to resize table view cells dynamically, that is, based on the content height you have in your cell. Use this feature only if you want your cell to be resized based on the content height. Autolayout will help us greatly in this section and I recommend revising/reading the Autolayout chapter before starting this section.
Resizing table view cells dynamically
How to do it...
- Create a new Xcode project with the name Dynamic Cells and a Single View template.
- Add a UITableView with the delegate and data source set. Add a prototype cell with a basic style, as we did in section one...