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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:46:15+00:00 2026-05-14T16:46:15+00:00

I am having two problems with viewcontrollerss in landscape orientation on the iPad. (1)

  • 0

I am having two problems with viewcontrollerss in landscape orientation on the iPad.

(1) I have two popups which hold tables. The tables should scroll to a specific row to reflect a selection in the main view. Instead, the tables do scroll down some but the actual selected row remains off screen.

(2) All my action sheets come up with a width of 320.

In Interface Builder, all my views are created in landscape orientation. Only the main Window is not, but I don’t see a way to change that.

My Configuration: Upon launch, I get the following coordinates for my main window and the main viewcontroller view:

Window frame {{0, 0}, {768, 1024}} mainView frame {{0, 0}, {748, 1024}}

All other views after that show these coordinates when summoned (when loaded but before being presented):

    frame of keysig {{0, 0}, {1024, 768}}
    frame of instrumentSelect {{20, 0}, {1024, 768}}
    frame of settings {{0, 0}, {467, 300}}

In all my viewControllers, i respond to shouldAutorotateToInterfaceOrientation with:

            return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || 
                        (interfaceOrientation == UIInterfaceOrientationLandscapeRight));

Everything (almost) functions as expected. The app launches into one of the two landscape modes. The views (and viewcontrollers) display everything where it belongs and taps work all across the screen as expected. However, I still have the two problems.

Problem 1: I have two popups containing tables long enough to run off screen. The tables should scroll to a selected row. They do scroll i.e. they don’t start visually at row 1 but they don’t scroll enough to actually show the selected row.

alt text http://idisk.mac.com/mahboud//Public/keysig.png

alt text http://idisk.mac.com/mahboud//Public/instrumentlist.png

It almost seems like a UITable internal rect gets created with the wrong number and stays that way but I’ve checked both of the UITableView’s scrollView content coordinates and they seemed reasonable.

Problem 2: I think this is related to problem 1 because my actionsheets come up with a width of 320. I can only assume that the iPad allows actionSheets in only 320 or 480 widths and since it somehow thinks that the screen is oriented in portrait mode, it uses the narrower width.

There you have it. I can’t believe I am still getting hung up on orientation issues. I swear Apple doesn’t make it easy to have a landscape app. Any ideas?

  • 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-14T16:46:15+00:00Added an answer on May 14, 2026 at 4:46 pm

    I sort of figured it out. If I take the

    [self.tableView scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionNone animated:YES];
    

    out of either the -viewDidAppear or -viewWillAppear, and instead put it right after my -presentPopoverFrom…, then it works:

    [popController presentPopoverFromBarButtonItem:keySigBBItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
    
    [keySignatureTableVC.tableView scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionMiddle animated:NO];
    

    What must be happening is that both -viewDidAppear and -viewWillAppear must be getting called before presentPopover… resizes or reorients the view. What I do in those two methods isn’t working on the correct frame or bounds. Scrolling after seems to work.

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

Sidebar

Related Questions

No related questions found

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.