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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:08:59+00:00 2026-06-03T03:08:59+00:00

how to change the width of the UIPickerView in objective C, I am using

  • 0

how to change the width of the UIPickerView in objective C, I am using the following code,

    tempFiled = Data;
    [tempFiled resignFirstResponder];
    CGSize sizeOfPopover = CGSizeMake(200, 200);
    CGPoint positionOfPopover = CGPointMake(32, 325);
    [popOverControllerWithPicker presentPopoverFromRect:CGRectMake(positionOfPopover.x, positionOfPopover.y+10, 500, sizeOfPopover.height)
         inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];

But when i am trying to change the width in CGSize sizeOfPopover = CGSizeMake(200, 200); its not changing, i want to reduce the size of the picker.

  • 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-06-03T03:09:00+00:00Added an answer on June 3, 2026 at 3:09 am

    I had this problem and solved it this way:

    - (void)viewWillAppear:(BOOL)animated
    {
        [super viewWillAppear:animated];
    
        CGRect frame = bpsPicker.frame;
        frame.size.width = 100; // width to be displayed on popover controller
        bpsPicker.frame = frame;
    
    }
    

    Using ViewDidLoad() is too early to alter this value.

    To be clear the viewWillAppear is in the UIViewController that is passed to the UIPopover (here called ‘MyViewController.m’).So,

    self.myViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil] ;
    self.myViewController.delegate = self;
    self.myViewController.contentSizeForViewInPopover = CGSizeMake(320, 360); // or whatever
    
    self.myViewControllerPopover = [[UIPopoverController alloc] initWithContentViewController:self.myViewController] ; 
    
    [self.myViewControllerPopover presentPopoverFromBarButtonItem:self.myToolBarButton permittedArrowDirections:UIPopoverArrowDirectionAny  animated:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm using this piece of code to resize my custom UIToolbar to change width
I'm able to change the width/height of the grid using this, so why won't
I am using a mx:Resize effect to change the width of an image in
I'm trying to change width value in the string using regex. Width can have
I have the following code to create a UIPickerView: pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f,
I have the following code that should change the selected rows in two different
I am trying to add a <div> using JavaScript and then change its width/height/top/left
how do you change the width of a textbox in an asp.net-mvc View i
I'm trying to change the width of a JQuery dialog after it has been
Does anyone know how to change the width of a uitableviewcontroller? I was thinking

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.