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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:01:32+00:00 2026-05-22T16:01:32+00:00

Edit—– i done the same code on english record scrolling speed remain fast as

  • 0

Edit—– i done the same code on english record scrolling speed remain fast as usual and its working fine, but when i am fetching Arabic data scrolling is slow again. is this a problem with arabic data???

I have records of about 100 and my tableview scrolling is very slow. can anyone tell me what is wrong with this code, and why iam getting slow scrolling?

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

    GreetingAppDelegate *appdelegate = (GreetingAppDelegate *)[[UIApplication sharedApplication]delegate];
    DBSetter *product = (DBSetter *)[appdelegate.myrecords objectAtIndex:indexPath.row];    

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        cell.textLabel.font=[UIFont fontWithName:@"Arial" size:16.0];
    }


    CGRect a=CGRectMake(8, 0, 307, 59);
    UIImageView *aImg=[[UIImageView alloc] initWithFrame:a];
    UIImageView *bImg=[[UIImageView alloc] initWithFrame:a];

    //if(indexPath.row%2==0)
    aImg.image=[UIImage imageNamed:@"cell-arrow.png"];


    //else {
    //  aImg.image=[UIImage imageNamed:@"CellHighlight.png"];   
    //}



    bImg.image=[UIImage imageNamed:@"cell-arrow-h.png"];
    [aImg setContentMode:UIViewContentModeScaleToFill];
    [bImg setContentMode:UIViewContentModeScaleToFill];
    cell.backgroundView=aImg;
    cell.selectedBackgroundView=bImg;
    [aImg release];
    [bImg release];


    NSString *tempStr=[NSString stringWithFormat:@"%@",product.tempdesc];

    //int stringlength=[tempStr length];
    //[[tempStr stringByReplacingOccurrencesOfString:@"<Dear User>" withString:@" "] substringWithRange:NSMakeRange(0, 20)];

    //if (stringlength >20) {
    //cell.textLabel.text = [NSString stringWithFormat:@"%@...", [[tempStr stringByReplacingOccurrencesOfString:@"<Dear user>" withString:@""] substringWithRange:NSMakeRange(0, 30)]];
    //}
    //else {
        cell.textLabel.text = tempStr;
    //}


    if(appdelegate.lang==2) 

    {
        [cell setTextAlignment:UITextAlignmentRight];
aImg.transform = CGAffineTransformMakeScale(-1, 1);
        bImg.transform = CGAffineTransformMakeScale(-1, 1);
    }

    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-22T16:01:33+00:00Added an answer on May 22, 2026 at 4:01 pm

    Thanks every one for your replies… i just figure out it my self. i just use length and range to make it works. the code that i used is as follow, for the one who might suffer same problem.

    NSString *tempStr=[NSString stringWithFormat:@"%@",product.tempdesc];
    
        int stringlength=[tempStr length];
        if (stringlength >20) {
        cell.textLabel.text = [NSString stringWithFormat:@"%@...", [[tempStr stringByReplacingOccurrencesOfString:@"<Dear user>" withString:@""] substringWithRange:NSMakeRange(0, 30)]];
        }
        else {
        cell.textLabel.text = tempStr;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: Changed as I have a different issue with the same code 2nd Edit:
Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code
Edit: I just moved my HTTPRequest code into the onCreate, and now all of
EDIT How to simplify the following code: if(x(a) > x(b)) s = b; e
EDIT: Reworked my code a bit and decided to throw out URLLoader in favor
Edit: This question was written in 2008, which was like 3 internet ages ago.
Edit: From another question I provided an answer that has links to a lot
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
EDIT: This question is more about language engineering than C++ itself. I used C++

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.