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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:56:33+00:00 2026-06-06T21:56:33+00:00

I want to show an image to the user when they launch the App.

  • 0

I want to show an image to the user when they launch the App. This image is being shown for 20 seconds.

I’d like to have a functionality where ,when a user launches the App in Landscape, the App stays in Landscape. And when a user lauches the App in Portrait, the App stays in Portrait.

I was realy having a hard time configuring this in the Appdelegate so I made a seperate viewcontroller for showing this image. When the timer is finished I navigate to the next view where rotation should be enabled.

So how can I temporary lock the UI of the iPad?

Edit:

I fixed this by implementing a orientation check within viewDidLoad in the first Viewcontroller after my Appdelegate. For every orientation I saved a value. When performing shouldAutorotate: I first check for the saved value which disables orientation changes.

Solution in code:

- (void)viewDidLoad {
    [super viewDidLoad];
    NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
    if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) {
        [[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"PortraitLandscapeIndicator"];
    }
    else {
        [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:@"PortraitLandscapeIndicator"];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    //the latest saved orientation is our orientation
    if([[NSUserDefaults standardUserDefaults] integerForKey:@"PortraitLandscapeIndicator"] == 1){
         return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight));
    }
    else{
        return ((interfaceOrientation == UIInterfaceOrientationPortrait) || (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown));

    }

}
  • 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-06T21:56:35+00:00Added an answer on June 6, 2026 at 9:56 pm

    Sounds like you will have to do something where a special viewController gets shown on start that in the loadView or init gets device orientation, then sets the views frame appropriately and which based on whatever mode portrait or landscape it is then only returns the allowed orientation from the [shouldAutorotateToInterfaceOrientation:].

    After your timer is up, you can pass control to some other viewController to take it from there or subsequently allow other orientations.

    But bottom line this is something I think you are going to have to do programmatically via whatever scheme works best for you.

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

Sidebar

Related Questions

I want to show image in a crystal report. Scenario is something like this.
I want to show an image view for three like on/off,if any one have
When I want to show an image I use something like this: public ActionResult
I have a site for which i want to show a image in india
How to show image icon of tabbar in full size like in this image
I'm making an app where i want to show the user a range of
I currently have an image that I want people's annotations to show up on,
I want to show the image that mobile phone's camera its taking on a
I want to show an image on my report if that image exists in
I need a jquery slideshow with div popup i want to show my image

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.