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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:52:22+00:00 2026-05-27T23:52:22+00:00

I am having UItableview with the custom cell. The custom cell has an image

  • 0

I am having UItableview with the custom cell. The custom cell has an image with lot of details. But my scrolling is jumpy. How I can improve the scrolling performance?

I am posting my code here:

    -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {       
        NSUInteger row = [indexPath row];



        Theo1AppDelegate *iDelegate = [[UIApplication sharedApplication] delegate];

        static NSString * ListitemCellIdentifier  = @"ListitemCellIdentifier";
        ListItemCell * cell  = (ListItemCell *)[tableView dequeueReusableCellWithIdentifier:ListitemCellIdentifier];

            if( cell == nil   )
            {
                [[NSBundle mainBundle] loadNibNamed:@"ListItemCell" owner:self options:nil];

                cell = self.mCell;
                self.mCell = nil;
             }



            cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
            SampleObject * p = nil;
p = [self.mSelections objectAtIndex:row ];
            cell.tag = row;

            cell.mPropertyLabel.text = [p Address];
            NSString * comboStr1 = [NSString stringWithFormat:@"%d ",  (int)[p.mBeds doubleValue] ];

            cell.mBedBathSqftLabel.text = comboStr1;

            NSNumber * number = [NSNumber numberWithDouble:[p.mBaths doubleValue]];
            NSString * string = [number stringValue];

            int le = [string length];
            if(le == 1)
            {
                cell.mBathLabel.frame = CGRectMake(590, 60, 30, 23);
                cell.mBathLabel.text = string;
            }
            else if(le == 3)
            {
                cell.mBathLabel.frame = CGRectMake(590, 60, 35, 23);
                cell.mBathLabel.text = string;
            }
            else if(le == 4)
            {
                cell.mBathLabel.frame = CGRectMake(590, 60, 40, 23);
                cell.mBathLabel.text = string;
            }


            int sqftval = [p.mLivingArea intValue];

            NSString * sqft = @"";
            if(sqftval == 0)
            {

                cell.mSqftLabel.text =@"NA";
            }
            else 
            {
                NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
                [numberFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
                NSString * isqft = [numberFormatter stringFromNumber:[NSNumber numberWithInt:sqftval] ];
                sqft = [NSString stringWithFormat:@"%@", isqft];
                cell.mSqftLabel.text = sqft;
                [numberFormatter release];
            }


            NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
            [numberFormatter setNumberStyle: NSNumberFormatterCurrencyStyle];
            NSString * pStr = [numberFormatter stringFromNumber:p.mPrice];
            NSString * pStr1 =[pStr substringToIndex:[pStr length]- 3 ];
            cell.mPriceLabel.text = pStr1;
            [numberFormatter release];



            NSString * cross = @"";
            if( p.mCrossStreet != nil )
                cross = [NSString stringWithFormat:@"%@", p.mCrossStreet];
            cell.mCrossStLabel.text = cross;
            if([p.mParkingTotal intValue] == 0)
            {
                cell.mParkingLabel.text = @"NA";
            }
            else 
            {
                NSString * parkingStr = [NSString stringWithFormat:@"%d", [p.mParkingTotal intValue] ];
                cell.mParkingLabel.text = parkingStr;
            }



            NSString * Notes = @"";
            if( p.mRemarks != nil )
                Notes = [NSString stringWithFormat:@"%@",  p.mRemarks];
                cell.c.editable = FALSE;

            int len = [Notes length];
            if ( len < 240)
            {
                 cell.mNotes.text = Notes;

            }
            else 
            {
                NSString * curString = [agentNotes substringToIndex:240];
                curString = [curString stringByAppendingString:@"...."];
                cell.mNotes.text= curString;
            }


                cell.selectionStyle = UITableViewCellSelectionStyleNone;

            cell.mID = p.mID;

            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-27T23:52:23+00:00Added an answer on May 27, 2026 at 11:52 pm

    You could put

    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
    

    in your cell == nil if statement, so it isn’t executed every time. I don’t see the point of checking the string length to change the frame of mBathLabel. And your 2 NSNumberFormatter could be made properties of the class so they don’t have to be alloc/init/released every time.

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

Sidebar

Related Questions

i'm having a UItableView with lot of cells. Each cell is associated with different
I'm having trouble displaying a multi-line UILabel in a custom UITableView cell. I'm currently
I am having trouble animating a custom UITableView section header. The goal was to
I am having a problem with the UITableview cell cutting off strings whose characters
I'm having an issue programmatically adding a subview to a UITableView cell. I am
I'm having a problem. I have a Custom UITableViewCel, the cell contains a slider
I have a custom UITableViewCell that has a UISegmentedControl object. My UITableView (questionnaire form)
I've created a custom UITableViewCell but am having trouble updating the contents of the
I have a UITableView with custom cell. I have created seperate class with xib
I am showing records in a UITableView having UITableViewCellAccessoryDetailDisclosureButton as the cell accessory. I

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.