i have the different image with the different size too, i want to put it in cell.imageView.image in every cell, but i want make same size in every cell although the image ha
If your cell is a built in cell, it is supposed that the cell will resize all the images to a fixed, default size. Can you post an screenshot of your application as well?
I just saw your question. I faced the same problem, and the code worked for me is following:
cell.imageView.frame = CGRectMake(0, 0, 50, 50);
Hope, it will solve your problem
In case anybody else runs into this with custom cells: it appears that if your custom cell has an outlet named imageView
, it will be treated like the image view in a basic-style cell, i.e. the image view's size will be adjusted. Simply picking another name avoids this behavior.
I just ran into this same problem. I wanted the photos to be 65 x 65, but they were filling in the size of the UITableViewCell instead. I resolved it by creating the UIImageView programmatically and adding it as a subview to the UITableViewCell. For example:
UIImageView *imageView = [[UIImageView alloc] initWithImage:photo];
imageView.frame = CGRectMake(6.5, 6.5, 65., 65.);
[cell addSubview:imageView];
Edit for clarity: This problem was occurring when I tried to create the UIImageView in Interface Builder. I took it out of Interface Builder and added it programmatically instead.