【发布时间】:2012-01-27 01:24:23
【问题描述】:
是否可以更改分组 UITableView 的半径?圆角对我的设计来说是一种激烈的方式。
【问题讨论】:
标签: iphone ios uitableview core-graphics
是否可以更改分组 UITableView 的半径?圆角对我的设计来说是一种激烈的方式。
【问题讨论】:
标签: iphone ios uitableview core-graphics
我认为唯一的方法是为表格单元格提供您自己的背景图片。您可以提供 3 张图片,让 UITableView 像 Apple 一样具有圆润的感觉。
在
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
将单元格的 backgroundView 设置为 UIView,并根据单元格索引使用所需的图像。这将允许您设置顶部、中间和底部。
这篇文章不错
http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html
一定要dequeueReusableCellWithIdentifier:
【讨论】:
不,不是。您可以使用标准的 tableview 和几个自定义背景图像来复制它。
【讨论】:
您必须根据您的选择更改cell.backgroundView 和cell.selectedBackgroundView。
【讨论】: