码迷,mamicode.com
首页 > 其他好文 > 详细

UITalbeViewCell--改变cell基本控件的frame的方法

时间:2014-11-15 18:46:25      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   sp   div   log   bs   as   nbsp   

和你意料的一样, 只需重写layoutSubviews

 1 - (void)layoutSubviews
 2 {
 3    [super layoutSubviews];
 4 
 5     // 3个基本控件都往左移动10
 6 
 7     CGRect textLabelF = self.textLabel.frame;
 8     textLabelF.origin.x -= 10;
 9     self.textLabel.frame = textLabelF;
10     
11     CGRect detailTextLabelF = self.detailTextLabel.frame;
12     detailTextLabelF.origin.x -= 10;
13     self.detailTextLabel.frame = detailTextLabelF;
14     
15     CGRect imageViewF = self.imageView.frame;
16     imageViewF.origin.x -= 10;
17     self.imageView.frame = imageViewF;
18 }

 

UITalbeViewCell--改变cell基本控件的frame的方法

标签:style   blog   color   sp   div   log   bs   as   nbsp   

原文地址:http://www.cnblogs.com/lYcHeeM/p/4099721.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!