I have couple of problems with my UITableView
.
When I add a UITableview
on my page, by default it brings up some fixed number of rows,
NEW ANSWER
In Swift 2.2, 3.0 and onwards, do the following:
tableView.tableFooterView = UIView()
OLD ANSWER BELOW. KEPT FOR POSTERITY.
If you must use UITableViewStylePlain
, and you don't use a footerView for anything else, you can use the following semi-dirty solution if you have ARC enabled.:
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
UIView *view = [[UIView alloc] init];
return view;
}
If you have ARC disabled, use the following:
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
UIView *view = [[[UIView alloc] init] autorelease];
return view;
}
This creates an invisible footerView, that appears immediately after the last data-filled cell.