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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:12:55+00:00 2026-06-15T02:12:55+00:00

I have created a binary clock and am using the willAnimateToInterfaceOrientation: duration: method to

  • 0

I have created a binary clock and am using the

willAnimateToInterfaceOrientation: duration: 

method to place the on/off buttons for either the portrait or landscape orientation. I have two tabs, the first of which is the binary clock itself, and the second of which are instructions for how to read the clock.

Here’s the issue. The iPad’s main screen automatically switched from portrait to landscape, so I can start my app in either orientation. The iPhone, on the other hand, only displays its main screen in portrait orientation. This is fine, but when I fire up my app, push either tab button, then change the orientation, while the screen (clock or instructions) changes orientation, selecting the other tab button displays that content in the previous orientation. Within the same view (clock or instructions), orientation changes perform perfectly, but when switching from one view to the other, after having changed the orientation, the content is not displayed correctly.

In other words, say I fire up my app on the iPad in landscape orientation. By default, the binary clock view appears. Were I to change to portrait orientation, the clock changes as expected. Were I then, keeping my iPad oriented in portrait mode, to press the instructions tab button, either the content and the iAd banner (or sometimes just the iAd banner) is displayed in landscape orientation. The only solution, thus far, is to change the orientation from the current setting to the other, then back again, but that is hardly acceptable.

Is there a different method I can use to check the orientation when the view is called and display the content correctly? Obviously what I have is not working correctly.

  • 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-15T02:12:56+00:00Added an answer on June 15, 2026 at 2:12 am

    If you move things dinamically on the view basing on the orientation, you have to check the current orientation in two places:

    1. in the willAnimate… Method, and this is ok. This method is called when a rotation occurs AND the main VC view is visible.

    2. in the viewWillAppear method!

    If the orientation is changed when a VC is not visible, the willAnimate… Method is not called. So, before displaying the view, you should check the device orientation and setup your view/sub views correctly.

    Simply use [[UIDevice currentDevice] orientation]; method in viewWillAppear to check what is the current orientation and setup your view correctly

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

Sidebar

Related Questions

I have created a binary file using the following matlab code: x is an
I have a binary tree class that is created with a root node and
I have created an android application that calls (using kSOAP library) a SOAP based
Hey guys, I have created a tree which is not a binary tree. Now,
I have one binary file which I have created. In it, data is stored
I have created a provisional profile using 'Non Wild Card App ID'. Which does
I have created a native HelloWorld application for BlackBerry 10 using BB NDK 10.0.9
I have created a binary search tree with {2,5,3,4,9,1,7,...,100} digits. how can i save
I have created a binary heap, which represents a priority queue. It's just classical
I have created a function template for loading my settings from a binary file.

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.