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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:49:19+00:00 2026-05-23T07:49:19+00:00

I have a UIPopoverController that I present from a CGRect on iPad like so:

  • 0

I have a UIPopoverController that I present from a CGRect on iPad like so:

MarkersPopViewController *markersPop = [[MarkersPopViewController alloc] initWithNibName:@"MarkersPopView" bundle:nil];
self.TestPopoverController = [[[UIPopoverController alloc] initWithContentViewController:markersPop] autorelease];
[TestPopoverController presentPopoverFromRect:CGRectMake(20, 20, 700, 500) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES];

My MarkersPopView is the container view that has a UITableView that takes up the bulk of the .xib, and a UISegmentedControl just above the top of the UITableView. The UITableView uses a custom subclass of UITableViewCell where each row is (700, 100).

When I run my app, the PopoverController is probably only 50 points wide and hugs the left side of the screen. I’d like to make the view the right width for starters, and then center it. Is there a reason why the UIPopoverController is so small? I thought the UIPopoverController uses the default size of the content view if setPopoverContentSize: was not used. Thanks.

  • 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-23T07:49:20+00:00Added an answer on May 23, 2026 at 7:49 am

    The CGRect passed to presentPopoverFromRect is the rectangle the popover will be displayed on some side of. It’s not the frame the popover will appear in.

    Since you are requesting the arrow be on the right of the popover, it tries to display the popover to the left of 20,20,700,500.

    To display the popover at 20,20 (actually where the arrow tip will be), pass a CGRect of 20,20,1,1.

    You might still have to specify popoverContentSize.

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

Sidebar

Related Questions

A very peculiar bug: I have BarButtonItem which pops out a UIPopoverController like that:
I have a UIPopoverController presented from a UIBarButtonItem. I have another UIBarButtonItem that is
I have a UIPopOverController that shows a UIViewController with a UITableview in its view.
I have a UIViewController that has an UIPopoverController that has an UINavigationController then a
I have made my application universal for iPhone and iPad (window-based application; universal) from
If I have a UIPopoverController (in .h file) and alloc init it multiple times
I have a view that displays in a UIPopoverController. Before, it just had properties
I have a UITableView which I present in a UIPopoverController . The table view
I have a UITabBarController inside a UIPopoverController, which I am displaying solely from one
I have an iPad app that has an MKMapView embedded in a UINavigationController which

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.