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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:48:40+00:00 2026-05-27T03:48:40+00:00

Maybe a basic problem, it’s my first app dealing with different orientations on iPad.

  • 0

Maybe a basic problem, it’s my first app dealing with different orientations on iPad.

UIView1
–> UIButton
–> Presents UIView2

In UIView1 and UIView2 i set the frame and Size of containing Views depending on orientation in

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

This is ok. But if View2 is in focus, the orientation changes and i close View2, View1 did not respond to orientation change. The View itself is in correct orientation, but the calculation of frame and size of in UIView1 contained elements is not executed.

What is the “correct” way to do this? Do i have to call a delegate method in View2 to set the new positions in View1 (hopefully resisting in background if it was not released because of memory)?

MadMaxApp

  • 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-27T03:48:41+00:00Added an answer on May 27, 2026 at 3:48 am

    You could implement

    - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
                                duration:(NSTimeInterval)duration;
    

    or

     willAnimateRotationToInterfaceOrientation:duration
    

    in your view controllers.

    Those methods will be called before the rotation changes and gives you a possibility of manually handling the rotation. This can be useful if the autoresize is not giving the correct results (I understand you are doing some custom calculations about your views layout in shouldAutorotateToInterfaceOrientation, so it might be the case).

    On a more general note, consider that there are several methods that deal with rotation; they have different responsibilities:

    1. shouldAutorotateToInterfaceOrientation: it just says which orientation are supported;

    2. willAnimateRotationToInterfaceOrientation:duration: this is the place where you can modify frames, sizes, positions, etc. when you want that those changes take effect during while the rotation is occurring;

    3. willRotateToInterfaceOrientation:duration:: do here whatever is necessary: stopping animations, timers, live update and so on;

    4. didRotateFromInterfaceOrientation:: do here the opposite to 3.

    This is just a guideline, of course. You could

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

Sidebar

Related Questions

Maybe a very basic problem, but i don't get it ... I've written my
This seems like basic problem, but I'm struggling with it (maybe because of tiredness).
I think I have some basic understanding problem so maybe someone's able to help
I have the following basic (and maybe stupid) understanding problem in JSF: There is
I'm running Windows Server 2k8 (maybe that's half the problem?) Anyway, I'm getting different
First off, The Problem: We have a Web App with a Flash front-end that
I think I have a synchronization problem...It may be too basic..Please help.. I have
Maybe a basic question but let us say I have a string that is
I know this maybe a basic question but I just can't seem to find
I know this maybe a very basic question but I'm having a bit of

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.