【问题标题】:how we can get the grouped UITableview style for ios 7 as similar to ios 6我们如何获得类似于 ios 6 的 ios 7 的分组 UITableview 样式
【发布时间】:2013-10-31 06:53:25
【问题描述】:

我正在更新我的应用程序,它将同时支持 ios 6 和 ios 7,现在的问题是我需要与 ios 6 类似的 ios 7 分组样式的 tableview。我不知道该怎么做?

【问题讨论】:

  • 我建议你发布更多关于你想要什么的细节。获取 iOS7 表与 iOS6 没有根本区别。它是你试图复制的“外观”吗?还是您的代码不起作用(如果代码不起作用,您需要发布它。您的问题太开放了,无法为您提供有用的答案。
  • 我需要同样的运气吗?

标签: ios


【解决方案1】:

通过继承UITableViewCell 并覆盖其-setFrame: 方法来实现这一点,如下所示:

- (void)setFrame:(CGRect)frame {
    frame.origin.x += inset;
    frame.size.width -= 2 * inset;
    [super setFrame:frame];
}

参考this link

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-10
    • 1970-01-01
    • 2013-09-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多