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

The Archive Base Latest Questions

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

When I am switching between Portrait to Landscape view (&Vice Versa) in iPad, position

  • 0

When I am switching between Portrait to Landscape view (&Vice Versa) in iPad, position of my popover view gets garbled. Here is how I am calculating frame of my popover view:

aRect = self.myElement.frame;
aRect.origin.x += aRect.size.width;

[aPopOver presentPopoverFromRect:aRect inView:self.myElement.superview permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES];

Please tell me whats wrong here?

  • 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-17T06:27:49+00:00Added an answer on May 17, 2026 at 6:27 am

    ok, i notice something weird about your code.

    any reason you are adding the size of the wide to the origin of aRect’s x position?
    aRect.origin.x += aRect.size.width;

    im assuming you want this to be the top right corner….

    You can uncomment the code in your .m file and make it like so:

    // Override to allow orientations other than the default portrait orientation.
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
         Return YES; // for supported orientations
        //otherwise return (interfaceOrientation == UIInterfaceOrientationLandscape); if you want only landscape mode.
    }
    

    Or what i would do in your situation if you want to layout your subviews is use the didRotateFromIntferfaceOrientation: like so:

    (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        [self layoutSubviews];
    }
    

    and also layoutSubviews

    - (void)layoutSubviews
    {
        NSLog(@"layoutSubviews called");
    
        ...recalc rects etc based on the new self.view.bounds...
    }
    

    It works like so.

    PK

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

Sidebar

Related Questions

I need a view controller(on ipad) to share two modes, one in portrait and
I'm switching between different Java SDKs (1.4.2, 1.5.0 and 1.6.0) for various projects. I
To make things easier when switching between machines (my workstation at the office and
My question about the reconfiguration delay when switching between Access 2003 and 2007 the
I'm wondering how slow it's going to be switching between 2 databases on every
Several people round here recommended switching to the new WD Velociraptor 10000rpm harddisk. Also
Possible Duplicate: Java : switching between dll depends on system architecture (32/64) In my
My application is running out of memory which switching between two activities. The first
Thinking about a solution to my previous question about switching between numerical and analytical
Is there any good empirical data on the cost of context switching between threads

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.