I have a prototype cell with a UIImageView.
I would like to position it exactly to the left edge of the screen (no space in between like it is by default).
First picture is what I have (default tableView and cells), second is what I try to do.
No matter what I try (frame
, bounds
, CGAffineTransform
on cell.imageView
) there is always a space between the edge and the image, it's like iOS prevent this behavior.
I'm not using AutoLayout and would like to do this programmatically.
Solution
#import "ResultCell.h"
@implementation ResultCell
-(void) layoutSubviews {
[super layoutSubviews];
self.imageView.frame = CGRectMake(-10,0,10,10);
}
@end
See @matt answer for more details.