2015-12-24 3 views

ответ

4

Хитрость заключается в том, чтобы повторно установить tableHeaderView или tableFooterView:

let tableView = ... 
let oldSize = tableView.contentSize // header + all rows + footer 

tableView.tableHeaderView.bounds.height -= 10 
tableView.tableHeaderView = tableView.tableHeaderView 

tableView.tableFooterView.bounds.height -= 10 
tableView.tableFooterView = tableView.tableFooterView 

assert(tableView.contentSize != oldSize) // no error :) 
1

После того, как вы обновите или поделитесь, вы должны позвонить tableview.reloadData t в виде заголовка таблицы.

Смежные вопросы