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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:00:30+00:00 2026-05-14T03:00:30+00:00

My application goes back and forth between Portrait and Landscape. I have all of

  • 0

My application goes back and forth between Portrait and Landscape. I have all of my content(labels, uiimageviews, uilabels) lined up to relocate for both orientations. However, the only change when the device is actually rotated. When I cycle between tabs after it has been rotated it just shows up autosized and not the way I have it setup when the user rotates it.

How can I detect the orientation of the device and display the view to reflect the orientation when the taps different tabs?

Ok, I set it to viewWillAppear. Is there a reason why it isn’t detecting the orientation and displaying the content where I have set it?

-(void)viewWillAppear:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration{

 UIInterfaceOrientation toOrientation = self.interfaceOrientation;
 [UIView beginAnimations:@"move buttons" context:nil];
 [UIView setAnimationDuration:0.5f];
 [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
 if(toOrientation == UIInterfaceOrientationPortrait
    || toOrientation == UIInterfaceOrientationPortraitUpsideDown)
 {
  aboutContent.frame = CGRectMake(20, 100, 280, 107);
  myLogo.frame = CGRectMake(-5, 20, 330, 65);
  bulletOne.frame = CGRectMake(40, 220, 240, 45);
  bulletTwo.frame = CGRectMake(40, 270, 240, 45);
 }
 else
 {
  aboutContent.frame = CGRectMake(40, 80, 400, 70);
  myLogo.frame = CGRectMake(230, 30, 20, 20);
  bulletOne.frame = CGRectMake(90, 140, 330, 65);
  bulletTwo.frame = CGRectMake(90, 170, 330, 65);
 } 
 [UIView commitAnimations];
}
  • 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-05-14T03:00:30+00:00Added an answer on May 14, 2026 at 3:00 am

    In each UIViewController’s viewWillAppear check the device’s orientation and if the orientation is different from how you have it layed out then send willRotateToInterfaceOrientation:duration: to self. That’s assuming that your willRotateToInterfaceOrientation:duration: will update the layout to the specified orientation.

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

Sidebar

Related Questions

I'm building an application and as time goes on, I have more and more
I have a J2EE application with a web service which goes like http://servername/service?task=getFile&id=25 How
I have a button on an ASP.NET wep application form and when clicked goes
This all goes back to some of my original questions of trying to index
What's the best practise to manage / restore application back stack between multiple sessions
I have an application that goes as follows (Home being the launch activity): D
I'm maintaining an application that goes sort of like this: There is a Page
I am using Yahoo Answers API to build a c# desktop application which goes
the Requirement in simple words goes like this. Its a charting Application ( kinda
I am creating a 3 tier application. Basically it goes Client -> (through optional

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.