I am trying to make a table in which the section headers can be long strings. I thought I had the settings right (dynamic number of lines, word wrapping set) but instead the string is simply truncated at the end. Note that the section header is sized with a height of 80, elsewhere, which is enough to display about 3 lines of text.
// Format section header
override func tableView(tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
let header: UITableViewHeaderFooterView = view as! UITableViewHeaderFooterView
header.contentView.backgroundColor = mainColorBlue
header.textLabel.textColor = UIColor.whiteColor()
header.textLabel.textAlignment = NSTextAlignment.Left
header.textLabel.numberOfLines = 0 // Dynamic number of lines
header.textLabel.lineBreakMode = NSLineBreakMode.ByWordWrapping
header.textLabel.font = UIFont(name: "HelveticaNeue-Thin", size: 16)!
header.textLabel.text = objectsArray[section].sectionName
}