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 1092543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:41:54+00:00 2026-05-16T23:41:54+00:00

I have a custom UITableView cell that sports an Image, and a headline. I

  • 0

I have a custom UITableView cell that sports an Image, and a headline. I used the fast scrolling example of ABTableViewCell from atebits.

It seems when I select the first row (which is my row with the largest image) it takes a considerable amoun of time to highlight the row, and then push the new view controller.

However when I select any of the other rows, with much smaller images, its almost instant.

Ive attempted to draw the picture using CGContextDrawImage and drawInRect but both yield the same results.

- (void)drawContentView:(CGRect)r highlighted:(BOOL)highlighted {
 if ([type isEqualToString:@"first"]) {
   CGContextRef context = UIGraphicsGetCurrentContext();
   UIColor *backgroundColor = [UIColor blackColor];
   UIColor *textColor = [UIColor whiteColor];
   UIColor *textBackgroundColor = [[UIColor alloc] initWithWhite:0 alpha:.5];
   UIColor *highlightColor;
   if (highlighted) {
     backgroundColor = [UIColor clearColor];
     textColor = [UIColor blueColor];
     highlightColor = [[UIColor alloc] initWithWhite:0 alpha:.3];
   } else {
     highlightColor = [UIColor clearColor];
   }

   [backgroundColor set];
   CGContextFillRect(context, r);
   [self.picture drawInRect:CGRectMake(0.0, 0.0, 320, 225)];
   [textBackgroundColor set];
   CGContextFillRect(context, CGRectMake(0, 170, 320, 55));  
   [textColor set];

   [self.title drawInRect:CGRectMake(5, 170, 320, 55) withFont:firstHeadlineFont lineBreakMode:UILineBreakModeWordWrap];
   [highlightColor set];
   CGContextFillRect(context, r);
 } else {
   CGContextRef context = UIGraphicsGetCurrentContext();
   UIColor *backgroundColor = [UIColor blackColor];
   UIColor *textColor = [UIColor blueColor];

   if (highlighted) {
     backgroundColor = [UIColor clearColor];
     textColor = [UIColor whiteColor];
   }
   [backgroundColor set];
   CGContextFillRect(context, r);

   CGPoint p;
   p.x = 0;
   p.y = 0;
   [self.picture drawInRect:CGRectMake(0.0, 0.0, 44, 44)];

   [textColor set];
   p.x += 44 + 6; // space between words
   [self.title drawAtPoint:p withFont:[UIFont systemFontOfSize:20]];
 }
}

EDIT:
IS there anything I can do to speed this up? I am caching the image and reading it as well.

  • 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-16T23:41:54+00:00Added an answer on May 16, 2026 at 11:41 pm

    I realized I was using a very very large version of the image for my first row, I was able to scale it down before I pulled it from the webserver and this vastly improved performance. NOTE: double check your dimensions are not huge. IE: 2184×1456 hahah

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom UITableView cell that has a UIImageView sized to the width
I have a UITableView that uses custom cells, loaded from nibs, and hooked up
I have a UITableView with custom cell that I have built. In each custom
I have UITableView.In that i have created custom cell with accessory button.Now by clicking
I have used custom cell class for my uitableview and used in cellForRowAtIndexPath method.
i have a custom UITableView Cell, i have selected a particular cell and goes
I have created a UITableView with a custom UITableViewCell . My cell includes one
I have a UITableView, and custom cells on it. On cell I have a
I have a custom UITableView cell which has a button and a label. I
I have a UITableView with custom cells in it. This custom cell looks like

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.