Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 349615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:28:30+00:00 2026-05-12T11:28:30+00:00

I have large images displayed in a grouped tableview. I would like the images

  • 0

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.
Thanks!

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *MyTableViewCellIdentifier = @"Cell";

MyTableViewCell *cell = (MyTableViewCell *) 
            [tableView dequeueReusableCellWithIdentifier: MyTableViewCellIdentifier];

    NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"MyTableViewCell" owner:self options:nil];
    for(id currentObject in nib)

        {
            cell = (DetailTableViewCell *)currentObject;
        }

MyAppAppDelegate *appDelegate = (MyTableViewCell *)[[UIApplication sharedApplication] delegate];
NSString *Path = [[NSBundle mainBundle] bundlePath];
NSString *MainImagePath = [Path stringByAppendingPathComponent:
        ([[appDelegate.myDictionaryOfImages objectAtIndex:indexPath.section] objectForKey:@"LargeImage"])];

cell.myLargeImage.image = [UIImage imageWithContentsOfFile:MainImagePath];

return cell;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:28:30+00:00Added an answer on May 12, 2026 at 11:28 am

    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;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tableview with large images that fill the cells and the row
I would like to have images displayed in a horizontal list. This is what
I have a group of images which I would like to display in a
I have a UITableView with lots of UIButton. Large local images displayed in buttons.
I have a large Png image file that I would like to display and
I have a UITableView that displays single large images in each cell. The names
I have a uitableview that loads fairly large images in each cell and the
how to animate a set of images, but I have a large set of
I have links of images in my database e.g.-http://accessories.us.dell.com/sna/images/products/large/330-5288.jpg above link of an image
I have about 45 decently large images (about 680x1000) that need to be loaded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.