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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:25:20+00:00 2026-06-17T17:25:20+00:00

I am working in Xcode 4.5.2, targeting iOS6 for an iPad app, using storyboards

  • 0

I am working in Xcode 4.5.2, targeting iOS6 for an iPad app, using storyboards and segues.
Preamble: my root controller (loaded by the app delegate) is a splash screen with only an image, an upgrade button and an open button. App takes a few seconds to load. I have shouldAutorotate and supportedInterfaceOrientations in all three of my full screen controllers. For rotation notification, I am using the following two methods in my root view controller:

- (void)awakeFromNib
{
    [UIDevice.currentDevice beginGeneratingDeviceOrientationNotifications];
    [NSNotificationCenter.defaultCenter addObserver:self
                                       selector:@selector(orientationChanged:)
                                           name:UIDeviceOrientationDidChangeNotification
                                         object:nil];
}

- (void)orientationChanged:(NSNotification *)notification
{
    UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
    if (UIDeviceOrientationIsLandscape(deviceOrientation))
    {
        // Landscape
        CGRect rect = _libraryViewController.libraryTableBorder.frame;
        _libraryViewController.libraryTableBorder.frame = rect;
        _libraryViewController.libraryTableBorder.image = [UIImage imageNamed:@"LibraryBorder_L.png"];
    }
    else if (UIDeviceOrientationIsPortrait(deviceOrientation))
    {
        // Portrait
        CGRect rect = _libraryViewController.libraryTableBorder.frame;
        _libraryViewController.libraryTableBorder.frame = rect;
        _libraryViewController.libraryTableBorder.image = [UIImage imageNamed:@"LibraryBorder_P.png"];
    }
}

I have these very same methods in the LibraryViewController and it works perfectly. I have another main view controller (entryView) that has the same methods without the calls for the libraryTableBorder. No matter what rotation the device is in coming from or going to the entry view, the table border swaps out correctly. And, when going from the library to either the entryView or to the splash, the views are correct.

The issue is going from the splash view in landscape to the library. Going to the library in Potrait works fine and the border displayed is the portrait border. But, in landscape, it also displays the portrait border. How can I get the library border to display in landscape when coming from the root view when it is in landscape?

Any help in solving this conundrum would be much appreciated!!!

  • 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-17T17:25:22+00:00Added an answer on June 17, 2026 at 5:25 pm

    I have found the solution to this issue… viewWillLayoutSubviews

    I was prompted by another thread, which pointed to the release notes for iOS6. I added the UIDeviceOrientation and my if/else statement to it. Now the border rotates correctly, regardless of which view I go to or come from!

    - (void)viewWillLayoutSubviews
    {
        UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
        if (UIDeviceOrientationIsLandscape(deviceOrientation))
        {
            // Landscape
            CGRect rect = _libraryTableBorder.frame;
            _libraryTableBorder.frame = rect;
            _libraryTableBorder.image = [UIImage imageNamed:@"LibraryBorder_L.png"];
        }
        else if (UIDeviceOrientationIsPortrait(deviceOrientation))
        {
            // Portrait
            CGRect rect = _libraryTableBorder.frame;
            _libraryTableBorder.frame = rect;
            _libraryTableBorder.image = [UIImage imageNamed:@"LibraryBorder_P.png"];
        }
    }
    

    This was sure a frustrating issues for me. Hope this helps someone else!

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

Sidebar

Related Questions

I am working on an IPad app in xcode. In the IPad simulator, I
I'm working with Xcode doing a Ipad app. i simply want user to click
I'm working in Xcode 4.3.2 using storyboards. I've created a segue between two views
I am working on xcode project intended to make a universal app.With the window
Working in Xcode/iPhone simulator, I have an app where UIGestureRecognizers were working for pinch,
I'm working in Xcode to make an iPhone app. I've used the better part
I'm attempting to create a new iPad project for an app I'm working on,
I am working in Xcode on a synthesizer application. I am using custom sliders
I'm working with Xcode developing for iOS using a UIScrollView . I got the
I am new to iOS programming and I am working with XCode learning storyboards.

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.