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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:46:21+00:00 2026-05-23T11:46:21+00:00

This are getting me a little confuse. I know the 2 properties in UIScreen

  • 0

This are getting me a little confuse. I know the 2 properties in UIScreen about the size screen, like in this question use applicationFrame, and this uses bounds.

  • applicationFrame – Show the size of device minus the statusBar. Making a NSLog in a iPhone, i get this values: (x=0, y=20, height= 460, width = 320)
  • bounds – Show all size screen. The values is: (x=0, y=0, height=480, width=320)

Now, if I rotate the device (potrait to ladscape) this will show
(The bounds will be all the same value)

  • Go to function: shouldAutorotateToInterfaceOrientation: x= 0 y=20 height= 460 width= 320
  • return YES so
  • Go function: didRotateFromInterfaceOrientation: x= 20 y=0 height= 480 width= 300
  • I don’t know why, but this pass one more time in shouldAutorotateToInterfaceOrientation and show: x= 20 y=0 height= 480 width= 300 (Is this a bug?)

I want to resize my view to this new size, but if I get the CGRect, it will give the correct size in the didRotateFromInterfaceOrientation and the height will be width and vice-versa.

Are there a good way to beautiful resize my view without setting this values by hand?

  • 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-23T11:46:21+00:00Added an answer on May 23, 2026 at 11:46 am

    (Assuming this point was for rotating from landscape back to portrait)

    I don’t know why, but this pass one
    more time in
    shouldAutorotateToInterfaceOrientation
    and show: x= 20 y=0 height= 480 width=
    300 (Is this a bug?)

    Its not a bug!

    shouldAutorotateToInterfaceOrientation is called before the UI rotates to match the orientation of the device. So, in the first case (Portrait to Landscape) it gives you the rect for the portrait orientation. in the second case (Landscape to Portrait) it gives you the rect for the Landscape orientation.

    Bottomline:
    shouldAutorotateToInterfaceOrientation gives CGRect values before initiating the UI rotation
    didRotateFromInterfaceOrientation gives CGRect values after completing the UI rotation

    I suggest you look autoresizesSubviews and autoresizingMask properties of UIView. This saves a lot of headaches when you are working with views that have to rotate/resize.

    Hope I have answered your question and you find this useful!

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

Sidebar

Related Questions

Thus far you guys have been wildly helpful with me getting this little ditty
I'm a little bit confused about how to approach this. I had never used
I'm not understanding some key bit of ExtJs idiom so this question is about
I know this question has appeared few times, but the things are changing really
Os i'm starting to use mysqli, i'm getting a little confused with how it
I am a little confused to use this script and how it actually works?
Anyone getting this error when using the new free chart controls MS bought from
I´m getting this error while trying to commit to a svn repository: svn: MKACTIVITY
Keep getting this error after inserting a subdatasheet into a query and trying to
am getting this error when i open my site in internet explorer......... plz help

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.