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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:37:20+00:00 2026-05-26T02:37:20+00:00

I am trying to add a simple UIActivityIndicatorView to multiple table cells. The activity

  • 0

I am trying to add a simple UIActivityIndicatorView to multiple table cells. The activity indicator is the same object for each cell. However, for some reason it is only showing on the last cell in the table.

- (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];
    }

    cell.accessoryView = _activityView;

    cell.textLabel.text = [_tableItems objectAtIndex:indexPath.row];
    cell.textLabel.textColor = DARK_GRAY;
    cell.detailTextLabel.text = [_tableSubtitles objectAtIndex:indexPath.row];
    cell.detailTextLabel.textColor = DARK_GRAY;

    return cell;
}

It seems to me that this code should have each cell object grabbing a pointer to the same activity view, so each cell’s accessory view should display the same activity indicator. However, the result is nothing on any cell’s accessory view except for the last one on the tableView, which displays the activity indicator as expected. Thanks for any tips as to why this is occurring.

  • 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-26T02:37:21+00:00Added an answer on May 26, 2026 at 2:37 am

    Your _activityView is a single object. So it has to be drawn somewhere on the screen. Since it’s a single object it will only be drawn once.

    When you assign it to a new cell, it updates internal variables. I’m not sure which ones. But those internal variables are responsible for its position on the screen.

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

Sidebar

Related Questions

I am trying to add a draggable object to to a simple html page.
I'm trying to add some simple user data into a database via a webpage
I'm trying to add some simple statements to a Sesame repository, like so: RepositoryConnection
I am trying to add some simple validation to my asp.net mvc form and
I have this simple code: <xsl:for-each select=GroupsServed> <xsl:value-of select=./>,<br/> </xsl:for-each></font> I'm trying to add
I am trying to add a simple HTML link to my code, however it
I'm trying to add a simple trigger to a table- the 1st issue i
I'm trying to add simple login page to ASP.NET MVC app. I actually use
I'm trying to add a very simple action to the context menu of Eclipse:
I'm trying to create a simple Add-On for SQL Server 2008; it is simply

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.