更改分组表的边框半径

更改分组表的边框半径

问题描述:

是否可以更改分组的UITableView的半径?圆角对于我的设计而言是非常大的方法。

Is it possible to change how radius of the grouped UITableView? The rounded corners are way to drastic for my design.

我相信,唯一的方法就是为表格单元格提供自己的背景图像。您可以提供3张图像,以使 UITableView 像苹果一样。

I believe that the only way to do this is to provide your own background images for your table cells. You can provide 3 images to have a rounded feel to the UITableView like Apple Does.


-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
将单元格的backgroundView设置为 UIView ,并根据单元格索引添加所需的图像。

in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath set the cell's backgroundView to a UIView with the image you want based on the cell index. This will allow you to set the Top, Middle and Bottom.

这是一篇不错的文章

http://cocoawithlove.com/2009/04/easy-custom-uitableview- drawing.html

只需确保 dequeueReusableCellWithIdentifier: