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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:48:08+00:00 2026-06-13T23:48:08+00:00

What is the logic behind the fact the main screen and self.view always maintain

  • 0

What is the logic behind the fact the main screen and self.view always maintain the same width and height dimensions regardless of orientation (even as the self.view does re-size correctly to fit the current device orientation), while a sub-View of self.view returns modified width and height dimensions when the device orientation changes?

NSLog(@"screen bounds w: %f, h: %f", [[UIScreen mainScreen] bounds].size.width,[[UIScreen mainScreen] bounds].size.height );

NSLog(@"self.view frame w: %f, h: %f", self.view.frame.size.width, self.view.frame.size.height );

NSLog(@"myView frame w: %f, h: %f", _myView.frame.size.width, _myView.frame.size.height );

Log output portrait

2012-11-05 16:15:11.152 test[2807:11303] screen bounds w: 320.000000, h: 480.000000
2012-11-05 16:15:11.153 test[2807:11303] self.view frame w: 320.000000, h: 460.000000
2012-11-05 16:15:11.153 test[2807:11303] myView frame w: 320.000000, h: 460.000000

Log output landscape

2012-11-05 16:14:38.800 test[2807:11303] screen bounds w: 320.000000, h: 480.000000
2012-11-05 16:14:38.801 test[2807:11303] self.view frame w: 300.000000, h: 480.000000
2012-11-05 16:14:38.801 test[2807:11303] myView frame w: 480.000000, h: 300.000000
  • 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-13T23:48:09+00:00Added an answer on June 13, 2026 at 11:48 pm

    Actually it more than auto-resizing masks. So when you change the orientation of the device, the physical characteristics of the screen remains the same. If you set your view to be auto rotate, the width and height are translated for you. So when asking for screen dimensions with translated views, its imp. for you to do calculations based on the self.view.center or self.view.bounds rather than on self.view.frame.

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

Sidebar

Related Questions

what is the reason /logic/obstacle behind the fact that partial methods can only have
The main point of this question is the logic behind the operation of the
I want to know the logic behind such comparison. Same is being done by
What is the logic behind google's pagination behaviour? My paginator goes something like this:
What is the logic behind disk defragmentation and Disk Check in Windows? Can I
what is the logic behind this on this website last activity: 1 min ago
I am attempt to understand the logic behind whatever trips the 'blocking' mechanism for
I think I understand the logic behind a delegate. I got more the problem
I couldnt find the exact logic behind 0-9-1 in the AMQP 0-9-1 protocol. Please
Anybody know ,what is the logic behind Thread.sleep in java? . Are they using

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.