У меня есть контроллер вида с таблицей внутри, которая сгруппирована. Это создает очень странный сбой, который заставляет секционные титры показывать сбоку. Я привязал верхние, конечные, нижние и ведущие ограничения к супервину для представления таблицы, и я протестировал возвращение UITableViewCell() в cellForRowAtIndexPath, чтобы узнать, вызвала ли это ядро эту проблему, но она все еще показывает это как это ,Заголовок заголовка UITableView Glitch?
var sectionTitles = ["Customer Orders", "Unprocessed Orders", "Processed Orders"]
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return sectionTitles.count
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func sectionIndexTitlesForTableView(tableView: UITableView) -> [String]? {
return sectionTitles
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell{
let cell = tableView.dequeueReusableCellWithIdentifier(CONSTANTS.CELL_IDENTIFIERS.ORDER_CELL) as! OrderTableViewCell
return cell
}
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
// Perform segue to order list in future
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return 117.0
}