Posted at

UITableViewの空セルのseparatorを消す

More than 5 years have passed since last update.


元情報

http://stackoverflow.com/questions/1633966/can-i-force-a-uitableview-to-hide-the-separator-between-empty-cells


test.m

UITableView *table = [[UITableView alloc] initWithFrame:frame];

UIView *v = [[UIView alloc] initWithFrame:CGRectZero];
v.backgroundColor = [UIColor clearColor];
[table setTableHeaderView:v];
[table setTableFooterView:v];