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

  • Home
  • SEARCH
  • 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 4330176
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:55:38+00:00 2026-05-21T09:55:38+00:00

I have a picker returning 3 components. I was told you can change the

  • 0

I have a picker returning 3 components. I was told you can change the size of the views by doing the following, but I am not too sure how to implement this…
implementing the UIPickerViewDelegate method pickerView:widthForComponent: method to size the components (probably 150, 20, and 150, or so).

I see in the documentation you set up a method like this, but dont know what to do next?

- (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component
{

}
  • 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-21T09:55:38+00:00Added an answer on May 21, 2026 at 9:55 am

    For using this you have to implement UIPickerViewDelegate…… and assign it to your pickerView…..

    if this method is being written in the same class where you are creating pickerView……
    then write…..

    pickerView.delegate = self;
    

    and in header implement this delegate…

    - (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component
    {
        if(component == 0)
           return 150.0;
    else if(component == 1)
           return 20.0;
    else if(component == 2)
           return 150.0;
    else
           return 150.0;
    
    }
    

    Components are numbered left-to-right.

    Thanks,

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

Sidebar

Related Questions

I have a date picker but i m trying the manual entry from user
I have the following code to draw a custom picker. Unfortunately when the view
I have an UIPickerView with 2 components. I save the user picker selection with
I need to limit the jquery ui date picker to only have future Tuesdays
In .NET 3.0, most controls have a flat style. Apparently, the date picker doesn't
The first language I learnt was PHP, but I have more recently picked up
I have a rails app that has picked up a bit of traction, but
I have in my Picker class: - (id)initWithFrame:(CGRect)frame withSender:(id)sender withDate:(NSDate*)date { if ((self =
I have used JqueryUI plugin- date picker to display my date. The format is
I have an iPhone app that use UIPickerView and 3 buttons. This picker has

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.