How can I make an image in a grouped tableview cell the width of the screen?

I finally got it working. Here is my final code define PHOTO_TAG 1 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Photo"; UIImageView *photo; UITableViewCell *cell = tableView dequeueReusableCellWithIdentifier:CellIdentifier; AppDelegate *appDelegate = (AppDelegate *)UIApplication sharedApplication delegate; UIImage *theImage = UIImage imageNamed:appDelegate. SectionsDelegateDict objectAtIndex:indexPath.

Section objectForKey:@"MainImage"; imageHeight = CGImageGetHeight(theImage. CGImage); imageWidth = CGImageGetWidth(theImage. CGImage); if (cell == nil) { cell = UITableViewCell alloc initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier autorelease; photo = UIImageView alloc initWithFrame:CGRectMake(0, 0, imageWidth, imageHeight) autorelease; photo.

Tag = PHOTO_TAG; cell addSubview:photo; } else { photo = (UIImageView *) cell viewWithTag:PHOTO_TAG; photo setFrame:CGRectMake(0, 0, imageWidth, imageHeight); } photo. Image = theImage; return cell; }.

I finally got it working. Here is my final code. #define PHOTO_TAG 1 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Photo"; UIImageView *photo; UITableViewCell *cell = tableView dequeueReusableCellWithIdentifier:CellIdentifier; AppDelegate *appDelegate = (AppDelegate *)UIApplication sharedApplication delegate; UIImage *theImage = UIImage imageNamed:appDelegate.

SectionsDelegateDict objectAtIndex:indexPath. Section objectForKey:@"MainImage"; imageHeight = CGImageGetHeight(theImage. CGImage); imageWidth = CGImageGetWidth(theImage.

CGImage); if (cell == nil) { cell = UITableViewCell alloc initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier autorelease; photo = UIImageView alloc initWithFrame:CGRectMake(0, 0, imageWidth, imageHeight) autorelease; photo. Tag = PHOTO_TAG; cell addSubview:photo; } else { photo = (UIImageView *) cell viewWithTag:PHOTO_TAG; photo setFrame:CGRectMake(0, 0, imageWidth, imageHeight); } photo. Image = theImage; return cell; }.

I have large images displayed in a grouped tableview. I would like the images to fill the entire width of the screen. I have been able to make this work using a tableViewCell interface builder, but in an attempt to improve performance I am now trying to do this programmatically.

However, I have not been able to get the image to be flush against the left side of the screen. It seems to be using the default position of the cells in the grouped tableview. I was able to make it work using a plain tableview, but then the section headers anchor on the top of the screen and I need them to scroll.

Any ideas how to do this programmatically? Here's my original code below.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions