From the course: iOS App Development: Accessibility

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Dynamic Type, part 3: UITableViewCells

Dynamic Type, part 3: UITableViewCells - iOS Tutorial

From the course: iOS App Development: Accessibility

Start my 1-month free trial

Dynamic Type, part 3: UITableViewCells

- In the last two videos, we've been adding support for dynamic type, allowing a user to adjust their reading size preferences, and having those changes reflected in our app Things are looking pretty good, but you'll notice that our table view cells are not expanding to fit the larger content. In order to support dynamic type in a table view cell, we have to make sure that they are dynamically sized. And this is easier than you'd expect. Back in Xcode, in our Bridge Index Table View Controller, scroll down to line 49. We've implemented the data source method, table view, height for row, at index path. And we're hard coding the value 105. The first thing we'll do is delete this method. Then, back up top in our view did load method, let's open up a new line, on line 22. And we simply need to tell our table view cell that its height will be driven by auto layout. And we do that by telling our table view that it's row height is equal to UITableViewAutomaticDimension. And we also need to…

Contents