override layoutSubviews for your UITableViewCell ...
- (void)layoutSubviews { [super layoutSubviews]; CGSize size = self.bounds.size; CGRect frame = CGRectMake(4.0f, 4.0f, size.width, size.height); self.textLabel.frame = frame; self.textLabel.contentMode = UIViewContentModeScaleAspectFit; }
or you can just create your own UILabel object and add it to cell.contentView as a preview.
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(4, 4, 30, 30)]; [cell.contentView addSubview:label]; [label release];
EvilPenguin
source share