Hi,
I want that my 4 cells will be in the center of my UITableView. Can't scroll the UITableView. That there will be the same height above the first cell and below the last cell.
thanks
Hi,
I want that my 4 cells will be in the center of my UITableView. Can't scroll the UITableView. That there will be the same height above the first cell and below the last cell.
thanks
Create an empty UIView, set its height to the height you require, and then set that view as the tableHeaderView
.
You can do it all from Interface Builder, even.
If you want to calculate what height is required:
CGFloat headerHeight = (tableView.size.height - tableView.rowHeight * [tableView numberOfRowsInSection:0]) / 2;
// assuming one section, otherwise add all sections