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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:17:54+00:00 2026-06-18T10:17:54+00:00

App Support: iOS6+ My app works in both portrait and landscape. But 1 controller

  • 0

App Support: iOS6+

My app works in both portrait and landscape. But 1 controller should only works in a Portrait.

The problem is that when I am in landscape and push the view controller the new viewcontroller is in landscape as well until I rotate it to portrait. Then it’s stuck in portrait as it should be.

Is it possible to always make it appear in portrait? Even if its parent is pushing it in landscape?

All the following code doesn’t help

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];

And this code works until and unless i am not pushing from landscape How to force a UIViewController to Portrait orientation in iOS 6

  • 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-18T10:17:55+00:00Added an answer on June 18, 2026 at 10:17 am

    I solved this by adding following lines in ViewDidLoad

    UIViewController *c = [[UIViewController alloc]init];
    [self presentViewController:c animated:NO completion:nil];
    [self dismissViewControllerAnimated:NO completion:nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app has to support landscape/portrait mode only for tablets, phones will only support
I have an app where I only support landscape orientation, it works great in
What I should do to support both maps in my app ,I mean that
I have an application which normally is a portrait app and only show landscape
I'm about to release an app and it must support both iOS5 and iOS6.
My iPad app contains a single view somewhere in the app that supports landscape
An iPad app can support inclusion of launch images in both orientations; presumably, if
Google App Engine doesn't support SSL for custom domains. Does this mean that it's
i'm writing an app that needs a calculation support (Fun project). However, is there
I am trying to make our App work on iOS6, but there is 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.