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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:03:44+00:00 2026-05-29T09:03:44+00:00

My app is fixed to landscape mode, yet during viewDidLoad() and even viewWillAppear(), the

  • 0

My app is fixed to landscape mode, yet during viewDidLoad() and even viewWillAppear(), the following portrait dimensions still return:

self.view.bounds.size.width = 320.00
self.view.bounds.size.height = 480.00

It’s not until viewDidAppear() that the actual landscape dimensions result.

self.view.bounds.size.width = 480.00
self.view.bounds.size.height = 320.00

I find this weird.
Why does this happen!? and how can I fix this?

  • 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-29T09:03:44+00:00Added an answer on May 29, 2026 at 9:03 am

    In your app’s info.plist file, specify the key:

     UISupportedInterfaceOrientations
    

    with values for landscape left and right:

    enter image description here

    EDIT:

    The raw plist code should look like this:

        <key>UISupportedInterfaceOrientations</key>
        <array>
            <string>UIInterfaceOrientationLandscapeLeft</string>
            <string>UIInterfaceOrientationLandscapeRight</string>
        </array>
    

    Edit 2

    You also need this key which determines the initial orientation of the status bar:

     <key>UIInterfaceOrientation</key>
     <string>UIInterfaceOrientationLandscapeRight</string>
    

    Further, you need to make sure that ALL of your view controllers (tabbar, navbar, regular view-controllers) implement

     shouldAutorotateToInterfaceOrientation
    

    and return a Landscape (left or right) value.

    Here is an Apple docs article on the subject:

    Technical Note TN2244

    And finally, here are some other SO posts on this topic:
    post 1 and post 2.

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

Sidebar

Related Questions

I'm trying to develop a simple Android app, fixed in landscape mode. I am
When I start my app in portrait mode, it works fine. Then I rotate
I have written an air app which is fixed in dimensions: 1000 w X
I need to preview PDF file, but run viewer in a landscape fixed mode.
![alt text][1]Hi folks i am using admob ads for my android applicaiton.in portrait mode
As you know, the main window of a native iOS app is usually fixed
I fixed a bug in my Android app, and uploaded the new APK to
I am creating an iOS web app that has a fixed div (say 200px
FIXED : SEE BELOW ok. so here's my app. http://libwiki.heroku.com/libraries if you view it
When you scroll a tableView down ( Notes.app ), the search bar stays fixed

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.