I have set imageView's frame in table using the following code.
cell.imageView.image = [UIImage imageWithContentsOfFile:[[users objectAtIndex:indexPath.row] valueForKey:@"ImagePath"]];
[cell.imageView setFrame:CGRectMake(5, 5, 10, 10)];
But image is displayed from the corner of the cell.
It does not changes the position or size.
what should I do ?
You will not be able to change the cells imageView frame. Your best option would be to create a custom cell.
You can change the frame of the cell by creating a subclass of UITableViewCell and overriding the layoutSubviews method.
In your subclass implementation of layoutSubviews, call super's implementation first and then modify the frame of imageView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With