distance between rows in UITableView
if you have a UITableView filled with for example 3 rows. like thi开发者_Go百科s,
------
------
------
how can i make this?
------
------
------
how can i change the distance between rows in a UITableView.
---- = a full row
- (CGFloat)tableView:(UITableView *)atableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {return 20;}
Implement this function in your m.-File. The value which is returned by this function consist of the height of the rows (px).
You can set the rowHeight property of the UITableView.
Set the row height in your UITableView - make sure it's longer than the height of your cell.
That extra row height will render as height padding.
精彩评论