开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜