I would like to set up margins or paddings for UITableView cells imageView, how could I do that?
With heightForRowAtIndexPath
I can only set rows height. And it
The best solution here is to create your own cell, add image, labels inside of contentView
and tweak them how you want.
But there's also another way, again you need to create a subclass from UITableViewCell
and override layoutSubviews
selector:
- (void)layoutSubviews
{
[super layoutSubviews];
self.imageView.frame = CGRectMake(10, 10, 50, 50);
self.imageView.contentMode = UIViewContentModeCenter;
}