【问题标题】:Changing grouped tables border radius更改分组表边框半径
【发布时间】:2012-01-27 01:24:23
【问题描述】:

是否可以更改分组 UITableView 的半径?圆角对我的设计来说是一种激烈的方式。

【问题讨论】:

    标签: iphone ios uitableview core-graphics


    【解决方案1】:

    我认为唯一的方法是为表格单元格提供您自己的背景图片。您可以提供 3 张图片,让 UITableView 像 Apple 一样具有圆润的感觉。

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 将单元格的 backgroundView 设置为 UIView,并根据单元格索引使用所需的图像。这将允许您设置顶部、中间和底部。

    这篇文章不错

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

    一定要dequeueReusableCellWithIdentifier:

    【讨论】:

      【解决方案2】:

      不,不是。您可以使用标准的 tableview 和几个自定义背景图像来复制它。

      【讨论】:

        【解决方案3】:

        您必须根据您的选择更改cell.backgroundViewcell.selectedBackgroundView

        【讨论】:

          猜你喜欢
          • 2021-11-17
          • 2022-01-15
          • 2021-08-09
          • 2014-09-06
          • 2016-10-15
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-08-14
          相关资源
          最近更新 更多