I would like to change the text size and font in my table view's section headers. Is there a way to do this in IB or in Swift?
format section headers in a table view
Add a Comment
I would like to change the text size and font in my table view's section headers. Is there a way to do this in IB or in Swift?
hi,
i would recommend that you check out Mark Moeykins's Moeykens's Itinerary App series on YouTube, especially the episode "Custom TableView Section Headers - Part 25 - Itinerary App (iOS, Xcode 10, Swift 4)."
he'll take you through how to define a custom header in IB (using a prototype UITableViewCell) and then use the delegate method func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? to use it in your table.
you'll enjoy the whole Itinerary App series, to be sure. (Credit to Mark Moeykins Moeykens -- sorry for the misspelling!).
hope thst helps,
DMG