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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:19:18+00:00 2026-05-27T14:19:18+00:00

I have UIActivityIndicatorView centered horizontally in a XIB. In iOS 4 (Simulator), the indicator

  • 0

I have UIActivityIndicatorView centered horizontally in a XIB.

XIB

In iOS 4 (Simulator), the indicator defaults to Large White (the color property being introduced in iOS 5), which is fine. The weird part is that it is also offset.

iOS4

My initial assumption was that something was wrong with the XIB (or something to that effect). However, in iOS 5 (Simulator, iPhone 4), it works perfectly.

iOS5

Seeing as how the only thing changed from iOS 4 to iOS 5 regarding UIActivityIndicatorViews was the addition of the color property, I’m stumped. I’m aware that there’s probably nowhere near enough information here to deduce the exact problem. I’m more concerned about where to start debugging, and welcome any suggestions as to what further information I could supply.

Further Information:

  • The iPad loads the indicator in a reliable position, only changing colors between iOS 4 and iOS 5.
  • I have two static origin points (portPoint = (x, y); landPoint = (w, z);), that I manually set on rotation. When the app loads, the indicator’s origin is (correctly) portPoint (which I’ve verified via NSLog), despite being visually misaligned. When I rotate to landscape, the origin correctly (visually and data-wise) sets to landPoint. When I rotate back, the origin correctly (visually and data-wise) sets to portPoint, thus resolving the issue.
  • 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-27T14:19:18+00:00Added an answer on May 27, 2026 at 2:19 pm

    You’re right that w/o seeing your code I can’t tell if anything else is going on but centering a view within a superview and maintaining that when the device rotates is fairly simple. Try this:

    1. Make sure the autoResizingMask of the UIActivityIndicatorView is set to UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin

    2. Position the activity indicator in the center of its superview, either in the XIB file or in viewDidLoad

    3. Don’t change the frame of the activity indicator on rotation, it should stay centered automatically

    If the above doesn’t fix it, post some code along with the autoResizingMask and contentMode values for relevant views.

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

Sidebar

Related Questions

I want to see in a moment my UIAlert above my UIActivityIndicatorView, i have
I want to have a custom view for UIActivityIndicatorView rather than relying on options
I have this method: -(IBAction)clickedDone; { UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; spinner.center =
My UIActivityIndicatorView always crashes my app. When I press my download button, the indicator
I have an UIView with 8 to 10 large images (each loaded into an
I had the UIActivityIndicatorView working fine in simulator and other 3.0 devices in my
I have seen many times waiting panels (panels with a uiactivityindicatorview ) black/dark with
I am trying to add an activity indicator during startup. I did have a
I have a subclassed UITableViewCell named AccountView which contains an UIActivityIndicatorView. Each cell is
I have some codes to process a large size file, it will take a

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.