---
title: "How to customize image view of UITableViewCell in Xcode-4.6?"  
description: "How to customize image view of UITableViewCell in Xcode-4.6?"  
author: "Anonymous User"  
published: 2016-02-02  
updated: 2016-02-03  
canonical: https://www.mindstick.com/forum/33948/how-to-customize-image-view-of-uitableviewcell-in-xcode-4-6  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# How to customize image view of UITableViewCell in Xcode-4.6?

My [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) is in the [imageView](https://www.mindstick.com/forum/34664/how-to-set-an-image-on-imageview-in-android) of UITableViewCell. I want to fit our images into the imageView of [table view](https://www.mindstick.com/forum/33654/send-table-view-cell-value-on-button-action-in-ios) cell with same height/width and a text in the [context](https://www.mindstick.com/forum/23245/what-is-context-in-android) view.\
I was trying this code:

```
cell.imageView.image = ifg.groupImage;cell.textLabel.text = ifg.groupName;
```

above [code running](https://www.mindstick.com/forum/159883/why-is-my-code-running-slowly-and-how-can-i-optimize-it-for-better-performance) perfectly but if the images are different width/size then it also same [reflection](https://www.mindstick.com/articles/13004/how-to-write-a-reflection-paper) displays in cell imageView, so that my [question](https://www.mindstick.com/blog/23175/how-to-solve-neet-question-paper-in-less-time) is how can [display images](https://www.mindstick.com/forum/147/how-to-display-images-in-asp-dot-net) with same width/height?\
I am [search](https://www.mindstick.com/articles/65368/best-smo-services-company-in-hyderabad-improve-search-rankings) it every where but can't find any easiest solution. Please help me.

## Replies

### Reply by Tarun Kumar

If you want to display image with same height/width in UITableViewCell, then you need to create custom UIImageView and add it in the contentView of table cell.\
See the example:

```
// creating custom image view (imgView) with same height/widthUIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,55,55)];imgView.backgroundColor = [UIColor clearColor];// adding image into imgView[imgView setImage:ifg.groupImage];// at last add the imgView into cell content[cell.contentView addSubview:imgView];
```

I hope it will be helpful for you.


---

Original Source: https://www.mindstick.com/forum/33948/how-to-customize-image-view-of-uitableviewcell-in-xcode-4-6

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
