【问题标题】:How to shrink static cells width in UITableViewController如何缩小 UITableViewController 中的静态单元格宽度
【发布时间】:2014-06-29 10:56:27
【问题描述】:

我想做类似的事情:

我可以用动态单元格做到这一点,但不能用静态单元格来解决这个问题

【问题讨论】:

    标签: ios xcode uitableview uiview


    【解决方案1】:

    我继承了我的 UITableViewCell,并在我的子类中重写了 layoutSubviews 方法:

    - (void)layoutSubviews
    {
        self.bounds = CGRectMake(self.bounds.origin.x,
                                 self.bounds.origin.y,
                                 self.bounds.size.width/3,
                                 self.bounds.size.height);
    
        [super layoutSubviews];
    }
    

    【讨论】:

      猜你喜欢
      • 2015-06-04
      • 2015-08-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-16
      • 1970-01-01
      • 1970-01-01
      • 2014-04-16
      相关资源
      最近更新 更多