Hello,
I do some download in my app where some of the data are images. In my app I save this data and create uiimages object where needed. Everything works fine so far. My problem is:
I have a custom tableViewCell class and in this class I have a UIImageView defined. No matter which size I set to this Uiimageview, the image put into it gets the height of the tablecell. I have tried to change the viewMode for the cell uiimageview content but without any luck so far. What can I do to actually get the images to be displayed with the size of the uiimageview it is added into...?
The images is created like this:
After this the images is saved into a dictionary and in the table delegate method
the image is added to the imageView, like this:
Any Ideas? I do not understand why the cell height controls the image height? What am I doing wrong?
Thanks in advance!
MACloop
I do some download in my app where some of the data are images. In my app I save this data and create uiimages object where needed. Everything works fine so far. My problem is:
I have a custom tableViewCell class and in this class I have a UIImageView defined. No matter which size I set to this Uiimageview, the image put into it gets the height of the tablecell. I have tried to change the viewMode for the cell uiimageview content but without any luck so far. What can I do to actually get the images to be displayed with the size of the uiimageview it is added into...?
The images is created like this:
Code:
NSFileManager *fileManager = [[NSFileManager alloc]init];
UIImage *imgToUse = [[UIImage alloc] initWithData:[fileManager contentsAtPath:[dict objectForKey:@"data_path"]]];
[fileManager release];
After this the images is saved into a dictionary and in the table delegate method
Code:
- (UITableViewCell *)tableView:(UITableView *)t cellForRowAtIndexPath:(NSIndexPath *)indexPath {
Code:
cell.imageView.image = [[self.imageDict objectForKey:@"some key here"];
Any Ideas? I do not understand why the cell height controls the image height? What am I doing wrong?
Thanks in advance!
MACloop