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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:09:09+00:00 2026-06-10T16:09:09+00:00

I am creating a simple utility app based on the xcode Utility App template.

  • 0

I am creating a simple utility app based on the xcode Utility App template. I want to restrict the FlipsideViewController orientation to only the orientation that the device was in when the FlipsideViewController was called. What is the easiest way to do this? I’ve tried doing it several different ways but so far all of them have failed. Thanks…

  • 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-10T16:09:10+00:00Added an answer on June 10, 2026 at 4:09 pm

    First, get the current orientation:

    - (void) viewDidAppear: (BOOL) animated
    {
        eLockOrient = self.interfaceOrientation;
    }
    

    Then, disallow anything else:

    - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation
    {
        if (eLockOrient == 0)
            return true;
        return (interfaceOrientation == eLockOrient);
    }
    

    ADD: I did some more testing and there are significant behavioral differences between the simulator and the device with respect to startup orientation. The device appears to behave correctly, but the simulator does not. It appears that if you put the simulator in landscape mode, when the app is started the simulator doesn’t remember to send the app messages to tell the app that it needs to rotate. The simulator doesn’t realize that it is in landscape. Below are traces from sim and device.

    Device:

    [TiAeManageSearchesVC.shouldAutorotate] intfOrient=1
    [TiAeManageSearchesVC.shouldAutorotate] intfOrient=1
    [TiAeManageSearchesVC.shouldAutorotate] intfOrient=1
    [TiAeManageSearchesVC.shouldAutorotate] intfOrient=4
    [TiAeManageSearchesVC.shouldAutorotate] intfOrient=4
    [TiAeManageSearchesVC.viewDidAppear] self.intfOrient=4

    Simulator:

    [TiAeManageSearchesVC.shouldAutorotate] intfOrient=1
    [TiAeManageSearchesVC.shouldAutorotate] intfOrient=1
    [TiAeManageSearchesVC.shouldAutorotate] intfOrient=1
    [TiAeManageSearchesVC.viewDidAppear] self.intfOrient=1

    So the above code will work with the exception of the noted log message. I am adding the following lines to improve the solution on physical devices. This will eliminate the error message in the log.

    if (eLockOrient == 0)
        return true;
    

    Otherwise, I think the problem is with the simulator. If you are trying to test against the first view when the app loads on the simulator, you will have these problems. I have tested subsequent views and they work correctly if you do the following:

    1. start the app.
    2. rotate the simulator.
    3. proceed to second view.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a simple web-based lookup utility for a board game called Rail Baron.
Background In Java, I want to make a simple, quick console app that provides
I am creating a utility to handle file uploads in webob-based applications. I want
I am creating simple app on Silverlight 4. In folder of View I have
i am creating simple call filter application which restrict unwanted calls. i use following
When creating a simple Flex 4.6 App, where the creationComplete-handler looks like this: protected
I am creating a simple web app. There is a <video> element on the
I am creating a quick'n'dirty utility that will enable editing of data read sequentially
I was creating a simple command line utility and using a dictionary as a
i am creating simple side menu, such that when the user hover on item

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.