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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:16:21+00:00 2026-05-15T23:16:21+00:00

I have an iPhone app containing a UITableView in grouped style. In the ViewController

  • 0

I have an iPhone app containing a UITableView in grouped style.
In the ViewController I defined an UIActivityIndicatorView as a property:

self.browsingIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
browsingIndicator.hidesWhenStopped = YES;

I want to place this spinner in one of the tables section headers:

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    UIView *sectionHeader = [[[UIView alloc] init] autorelease];
    [sectionHeader addSubview:browsingIndicator];
    browsingIndicator.center = CGPointMake(20, 30);

    return sectionHeader;
}

This is working. Now the problem: Once I change the device orientation the activity indicator vanishes, it only reappears when I drag it out of the visible screen and back in. Turning the device back to the original orientation doesn’t help, changing “hidesWhenStopped” to NO neither.

Can someone point me in the right direction? Thanks!

  • 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-15T23:16:21+00:00Added an answer on May 15, 2026 at 11:16 pm

    Thanks for your answer Mike, but I don’t think that’s it.
    The UIActivityIndicatorView is positioned and resized correctly but it is not drawn. When I force the sectionHeader to redraw (by scrolling it out of view) it spins at exactly the right place, even in landscape orientation.

    I tried to explicitly set the autoResizingMask, but that didn’t change the1 disappearing.

    Edit: Couldn’t comment on your answer, I didn’t really get the post/comment without registering thing here, sorry :-/

    Edit2:

    [sectionHeader addSubview:browsingIndicator];
    

    seems to be part of the problem. If I return browsingIndicator directly it is working.

    Kind of solved now:
    If I define the UIView for the section header outside of the viewForHeaderInSection method and then just return it, it works.

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

Sidebar

Related Questions

On my iphone app, I have a UITableView in edit mode, containing custom UITableViewCell.
I have a rather simple iPhone app consisting of numerous views containing a single,
Greetings! I have a working iPhone app (huzzah!) that uses a MainView.xib containing a
I have this iPhone app that has an array containing around 50 to 100
I have an iPhone app with a Core Data database containing a list of
I have an iPhone app that I've built for the app store. Before I
I have an iPhone app that I am writing and it has 2 targets
I have an iPhone app that allows users to record videos and I'd like
I have an iphone app i want that befor moving to next screen it
I have an iPhone app running in the simulator that won't quit. I also

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.