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

  • Home
  • SEARCH
  • 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 6625343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:45:50+00:00 2026-05-25T21:45:50+00:00

I have a settings view controller with a table view. The table view is

  • 0

I have a settings view controller with a table view. The table view is supposed to set its frame to be the frame of the view controller. My app only supports landscape mode, so that’s the orientation I’m always in.

However, when the settings view controller loads, the table view has the portrait mode frame of the view controller, even though it’s in landscape (360 by 480 when it should be 480 by 360).

Additionally, when I checked to see if the device thought it was in portrait mode, it returned true.

What is causing the problem and how can I fix it?

  • 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-25T21:45:50+00:00Added an answer on May 25, 2026 at 9:45 pm

    when you call [UIView init] it will default to the screen size of your device in portrait mode (same goes for iPad but with larger size).
    Inside [UIViewController viewDidLoad] the self.view will also default to this size.

    Screen rotation is only done to the top view (controller) in your hierarchy and rotation messages are forwarded through container-VCs that support this behavior (e.g. UINavigationController, UITabBarController).

    If you want your view to be sized correctly, use [UIView initWithFrame:self.view.bounds] for creating a view. Insinde UIViewController you only have the chance to override the loadView Method to set the frame before viewDidLoad gets called (or you could use a different XIB for landscape). You could also hardcode the view’s size by setting its frame first thing in viewDidLoad

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

Sidebar

Related Questions

I have an app I am working on, that has a table view with
I have a view where the user can change some settings, its basically a
I have an app with a table view at the root in a navigation
For my project I have settings that I added through the Settings in the
I have some settings in my app.config which I intend to be 'global' -
I have a settings menu that pops up and in it is a ListPreference
I have a settings bundle in my iPhone app, with the following PList: Type:
I have a view controller managed in a UINavigationController. My view controller puts up
I've got a fetched results controller handling a table view, and I'm having a
I'm building an APS.net MVC 2 app, where I have a parent table and

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.