UITalbeViewCell--改变cell基本控件的frame的方法
和你意料的一样, 只需重写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 }