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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:49:12+00:00 2026-06-08T10:49:12+00:00

I have a tableviewcontroller, specifically, in my app which is getting a little jittery

  • 0

I have a tableviewcontroller, specifically, in my app which is getting a little jittery when scrolling.

I fairly certain it’s because of my custom UISegmentedControl appearance, I have four in my table, each in their own cell.

I use this code in my app delegate to customise them:

[[UISegmentedControl appearance] setBackgroundImage:[[UIImage imageNamed:@"SegmentedControl.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 4, 0, 4)] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    [[UISegmentedControl appearance] setBackgroundImage:[[UIImage imageNamed:@"SegmentedControlSelected.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 4, 0, 4)] forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
    [[UISegmentedControl appearance] setDividerImage:[UIImage imageNamed:@"SegmentedControlDivider.png"] forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    [[UISegmentedControl appearance] setDividerImage:[UIImage imageNamed:@"SegmentedControlSelectedDivider.png"] forLeftSegmentState:UIControlStateSelected rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    [[UISegmentedControl appearance] setDividerImage:[UIImage imageNamed:@"SegmentedControlSelectedDivider.png"] forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
    [[UISegmentedControl appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
                                                             [UIColor whiteColor], UITextAttributeTextColor,
                                                             [UIColor grayColor], UITextAttributeTextShadowColor,
                                                             [NSValue valueWithUIOffset:UIOffsetMake(0, -1)], UITextAttributeTextShadowOffset,
                                                             [UIFont fontWithName:@"Georgia-Italic" size:0.0], UITextAttributeFont,
                                                             nil] forState:UIControlStateNormal];

Why might this cause such a slow down? What could I do to improve performance? It jitters as they come onto the screen. I have never had a problem like this before.

I’m fairly sure its the switches and segmented controls, as when I remove them it speeds up and goes all silky smooth. I basically do this:

if (indexPath.row == 0)
        {
            cell.textLabel.text = @"text";
            UISegmentedControl *segControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"1", @"2", nil]];
            [segControl setSelectedSegmentIndex:[myBool boolValue]];
            [segControl setSegmentedControlStyle:UISegmentedControlStyleBar];
            [segControl addTarget:self action:@selector(myMethod:) forControlEvents:UIControlEventValueChanged];
            cell.accessoryView = segControl;
        }

In my cellForRowAtIndexPath 7 times, how can I make this faster?

  • 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-08T10:49:15+00:00Added an answer on June 8, 2026 at 10:49 am

    I have an app that I am working on and I had some similar customizations. I recommend reusing the set controls… You can accomplish this by making a UITableViewCell subclass and setting up your seg control in it, then you can create outlets for the things you need to customize.

    A quick search found this tutorial and it looks like what I am talking about

    UITableViewCell Prototype Tutorial

    This way your cells will be completely reusable and therefore, much faster.

    But then, I don’t now your exact use case, so maybe this won’t apply to you. It sped up my cells with custom buttons, art, and animations quite a bit.

    Just remember alloc inits are very slow.

    I guess another option would be to pre-init all that you can with the controls and maybe store them in and array then only load them in cellForRowAtIndexPath:

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

Sidebar

Related Questions

I have an iPhone app with a tableviewcontroller. When you click a certain cell
I have an app which got 4 TableViewController which each make an instance of
have written this little class, which generates a UUID every time an object of
I have started creating an app which uses a core data stack at the
I have two View Controllers: TableViewController (which is used as a modal view controller)
I have created an app that uses a tableViewController, and populates its cells from
I have a main home screen in my app which I am eventually hoping
I have a TableViewController which is supposed to load a ViewController with a WebView
I have a application which uses two instances of one TableViewController in two different
I have a navigation controller which I push a new tableviewcontroller for each received

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.