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

  • Home
  • SEARCH
  • 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 6944377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:17:57+00:00 2026-05-27T13:17:57+00:00

Please forgive my ignorance. Traditionally I’ve been doing something like this, but it feels

  • 0

Please forgive my ignorance. Traditionally I’ve been doing something like this, but it feels like a lot of unnecessary work and I’m not sure if there are easier ways to accomplish this.

// logoView dimensions
static const CGFloat LOGO_VIEW_X_PORT = 42;
static const CGFloat LOGO_VIEW_Y_PORT = 20;
static const CGFloat LOGO_VIEW_W_PORT = 237;
static const CGFloat LOGO_VIEW_H_PORT = 82;
// 
static const CGFloat LOGO_VIEW_X_LAND = 142;
static const CGFloat LOGO_VIEW_Y_LAND = 20;
static const CGFloat LOGO_VIEW_W_LAND = 237;
static const CGFloat LOGO_VIEW_H_LAND = 82;

- (void)viewDidLoad {
    [super viewDidLoad];

    // init logo view
    self.logoView = [[UIImageView alloc] initWithImage:...];

    // determine device orientation and set dimensions 
    if (self.interfaceOrientation == UIDeviceOrientationPortrait || 
        toInterfaceOrientation == UIDeviceOrientationPortraitUpsideDown) {
        self.logoView.frame = CGRectMake(LOGO_VIEW_X_PORT, LOGO_VIEW_Y_PORT, LOGO_VIEW_W_PORT, LOGO_VIEW_H_PORT);
    } else {
        self.logoView.frame = CGRectMake(LOGO_VIEW_X_LAND, LOGO_VIEW_Y_LAND, LOGO_VIEW_W_LAND, LOGO_VIEW_H_LAND);
    }

    [self.view addSubview:self.logoView];

}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
    if (toInterfaceOrientation == UIDeviceOrientationPortrait || 
        toInterfaceOrientation == UIDeviceOrientationPortraitUpsideDown) {
        self.logoView.frame = CGRectMake(LOGO_VIEW_X_PORT, LOGO_VIEW_Y_PORT, LOGO_VIEW_W_PORT, LOGO_VIEW_H_PORT);
        // long list of other views...
    } else {
        self.logoView.frame = CGRectMake(LOGO_VIEW_X_LAND, LOGO_VIEW_Y_LAND, LOGO_VIEW_W_LAND, LOGO_VIEW_H_LAND);
        // long list of other views...
    }
}

Is there a better protocol I should be following to accomplish this, or is this more or less how everyone handles multiple orientations?

  • 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-27T13:17:57+00:00Added an answer on May 27, 2026 at 1:17 pm

    Have a look on the autoResizingMask option of all graphical objects. That should help.

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

Sidebar

Related Questions

Please forgive my programming knowledge. I know this is a simple thing, but I
Please forgive my ignorance and poor SQL programming skills but I am normally a
Please forgive my noob-ness on this, but how do I package LAME.exe w/ a
Please forgive if this question has been asked numerous times. I recently installed Eclipse
I'm not a Rails developer (currently) so please forgive my ignorance on this. One
This might seem like a dump question, but my complete ignorance with VbScript is
Please forgive me if this question has been asked and answered already. If so,
Please forgive the noob question. I've been developing this little app (with Unity) for
Please forgive the ignorance, but I'm very new to PHP and I couldn't find
Please forgive my ignorance, but I am very new to IOC and NinJect. I

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.