I’m programming an app that is containing a RSS reader. The rss reader is downloading a title, description and a image. The image I placed in the accessoryview in the same cell as the description. The description is placed in a textlabel and resize perfectly to the image. But i would like the image to be displayed in the left side. But when i remove the images from the accessoryview and move it to the image to the left side the Textlabel doesn’t resize.
How do i resize the textlabel.
CGRect f = cell.textLabel.frame;
[cell.textLabel setFrame: CGRectMake(f.origin.x-20, f.origin.y, f.size.width-50, f.size.height)];
cell.textLabel.font = [UIFont systemFontOfSize:11];
cell.textLabel.numberOfLines =3;
cell.textLabel.textColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7];
cell.backgroundColor = [UIColor clearColor];
cell.textLabel.backgroundColor = [UIColor clearColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
I have tried to resize it with the setframe function but that doesn’t work.
Hope there are some of you that can push me in the right direction.
Thanks in advance
You need to subclass the UITableViewCell class. Here is an example:
.h file:
.m file:
@end