I'm attempting to build a tableView from the controller without just building static cells myself in the storyboard. I have all the cells being populated from an array, and I want the section headers to display from a different array. numberOfSections...
returns 5. I have my titleForHeaderInSection
method as follows:
override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
return self.questions[section]
}
my self.questions
array:
let questions = ["Have you had difficulties participating in normal training and competition due to ankle problems during the past week?",
"To what extent have you reduced your training volume due to ankle problems during the past week?",
"To what extent have ankle problems affected your performance in the past week?",
"To what extent have you experienced ankle pain related to your sport during the past week?",
"Finished?"];
For some reason when I run the app, the headers are only one line, and thus not showing the full question I want displayed. What could be causing this? Based on other questions and research, do i need to create my own view?