首页 > 其他 > 详细

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

时间:2014-11-15 18:45:09      阅读:212      评论:0      收藏:0      [点我收藏+]

和你意料的一样, 只需重写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的方法

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!