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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:09:57+00:00 2026-06-07T01:09:57+00:00

My app is scrolling very slow when I have Images set for each cell.

  • 0

My app is scrolling very slow when I have Images set for each cell. I have tried using the SDImageWeb Project, but it still scrolls just as slow, and all the image views on the cell end up getting stretched around. Here is my code in the cell at row.

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

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];


}



RSSEntry *entry = [_allEntries objectAtIndex:indexPath.row];

//root path of image...used to check if image exists for this article
NSString *substring = @"http://316apps.com/ipreachersblog/wp";
NSRange textRange = [entry.articleImage rangeOfString:substring];

if(textRange.location != NSNotFound){
    NSString *thearticleImage = entry.articleImage;
    NSRegularExpression *expression = [NSRegularExpression regularExpressionWithPattern:@"(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))" options:NSRegularExpressionCaseInsensitive error:NULL];
    NSString *someString = thearticleImage;
    NSString *oneurl = [someString substringWithRange:[expression rangeOfFirstMatchInString:someString options:NSMatchingCompleted range:NSMakeRange(0, [someString length])]];
    NSURL *picimage = [NSURL URLWithString:oneurl];
    UIFont *cellFont = [UIFont fontWithName:@"ArialRoundedMTBold" size:15];

    UIFont *cellFont2 = [UIFont fontWithName:@"ArialRoundedMTBold" size:12];    
    NSData * urlData = [NSData dataWithContentsOfURL: picimage];
    UIImage * imageweb = [UIImage imageWithData: urlData];
    CGSize newSize = CGSizeMake(69, 69);
    UIGraphicsBeginImageContext( newSize );
    [imageweb drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
    UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    CALayer * l = [cell.imageView layer];
    [l setMasksToBounds:YES];
    [l setCornerRadius:11];
    [l setBorderWidth:2.0];
    [l setBorderColor:[[UIColor blackColor] CGColor]];
    cell.textLabel.text = entry.articleTitle; 

    cell.textLabel.font = cellFont;
    cell.detailTextLabel.font = cellFont2;
    cell.imageView.image = newImage;
    cell.imageView.contentMode = UIViewContentModeScaleAspectFill;


}
else    {
 //loads when no featured image present

}


return cell;
}

Any ideas?

  • 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-06-07T01:09:58+00:00Added an answer on June 7, 2026 at 1:09 am

    The problem is here

    NSURL *picimage = [NSURL URLWithString:oneurl];
    UIFont *cellFont = [UIFont fontWithName:@"ArialRoundedMTBold" size:15];
    
    UIFont *cellFont2 = [UIFont fontWithName:@"ArialRoundedMTBold" size:12];    
    NSData * urlData = [NSData dataWithContentsOfURL: picimage];
    UIImage * imageweb = [UIImage imageWithData: urlData];
    CGSize newSize = CGSizeMake(69, 69);
    UIGraphicsBeginImageContext( newSize );
    [imageweb drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
    UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    CALayer * l = [cell.imageView layer];
    [l setMasksToBounds:YES];
    [l setCornerRadius:11];
    [l setBorderWidth:2.0];
    [l setBorderColor:[[UIColor blackColor] CGColor]];
    

    For every time you scroll the view 3 cells are downloading the images. Here you are resizing images which is not recommended

    You need to set image in Lazy load like this

    [cell.imageView setImageWithURL:picimage placeholderImage:[UIImage imageNamed:@"loadingPicture.png"]];
    

    and every thing will be taken care by this. you can get this by importing this SDImageCache class, it will be available in this sample code at here

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

Sidebar

Related Questions

I have some strange scrolling problems with my PhoneGap (using jQuery Mobile) app: I'm
In my app I have a UITableView that contains custom UITableViewCells. Scrolling is very
I have a vertically scrolling uiscrollview - imagine an 'about this app' page of
I've been developing an app specifically for modern browsers and have made very heavy
Since I had a very slow scrolling tableView I'm now trying to catch up
I have a very critial business application presently running using Winforms. The application is
I am working on a side-scrolling iPhone app, and I have every resource, except
I have a form-based app where each form is a scrollable layout of various
My app has a set of categories. A category can have sub-categories. DirectoryCategoryController is
To preface this question, this is my first app and I have a very

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.