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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:30:23+00:00 2026-05-26T18:30:23+00:00

I have a UIPickerView displayed inside a UIPopoverController . The dimensions of the UIPickerView

  • 0

I have a UIPickerView displayed inside a UIPopoverController. The dimensions of the UIPickerView are: 320x216. For some reason, the UIPickerView seems to be ~3/5 of the proper height, and the UIPopoverController spans all the way down to the bottom of the screen.

Please see the code below.

Thanks!

self.picker = [[[UIPickerView alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height+44, 320, 216)] autorelease];
self.picker.backgroundColor = [UIColor clearColor];
self.picker.showsSelectionIndicator = YES;
self.picker.delegate = self;
self.picker.dataSource = self;
self.picker.transform = CGAffineTransformMakeScale(-1, 1);
UIViewController *pickerController = [[UIViewController alloc] init];
[pickerController setView:self.picker];
UIPopoverController *pickerPopover = [[UIPopoverController alloc] initWithContentViewController:pickerController];
[pickerPopover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
pickerPopover.delegate = self;
self.popover = pickerPopover;
[pickerController release];
[pickerPopover release];
  • 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-26T18:30:24+00:00Added an answer on May 26, 2026 at 6:30 pm

    The reason for the “squashed” picker view seems to be this line:

    [pickerController setView:self.picker];
    

    Instead, add the picker view as a subview:

    [pickerController.view addSubview:picker];
    

    Next, to fix the popover height, set popoverContentSize before presenting it:

    pickerPopover.popoverContentSize = picker.frame.size;
    

    Also, fix the picker view’s frame from this:

    CGRectMake(0, self.view.bounds.size.height+44, 320, 216)
    

    to this:

    CGRectMake(0, 0, 320, 216)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to have a UIPickerView just have escalating numbers to infinity?
Does anyone have a basic example to display a UIPickerView when a UITextField was
I have a UIPickerView as subview in a UITableViewController, which I want to slide
I have a UIPickerView on my UIView along with a UITextField . I am
I have an UIPickerView with 3 components populated with 2 NSMutableArrays (2 components have
I'm trying to have a UIPickerView slide from the bottom of the screen (over
I have the following code to create a UIPickerView: pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f,
So I have a uipicker view, that I have managed to load some data
is it possible to handle two data sources in the UIPickerView? I have here
I have a UIPickerView which works correctly, now I want to add a button

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.