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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:04:24+00:00 2026-06-07T22:04:24+00:00

I would like to know the width of the dark grey frame on either

  • 0

I would like to know the width of the dark grey frame on either side of the inside picker part and the width of the separators between components. This would be at default settings (eg. what’s shown in the .xib). Or, how to find such values programmatically. Thank you

To clarify, I’m looking for what the “suggested minimums” might be for those values. I’m putting my UIPickerView in a popover, and the UIPickerView is wider than 320 px (which is what the .xib gives as the “default”). I would like to know these values so I can add them to the popover’s width to make sure it doesn’t cut off components on the right side of the UIPickerView.

  • 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-07T22:04:26+00:00Added an answer on June 7, 2026 at 10:04 pm

    Well this can be a little tricky since the Picker can have a dynamic number of components. So in order to find the widths you have to take into account the number of components. This can be done like so:

            NSInteger n = picker.numberOfComponents;        
    
            const CGFloat separatorWidth = 8.0f;
            const CGFloat sectionExceedWidth = -2.0f;
            CGFloat totalWidth = picker.bounds.size.width;
            CGFloat panesWidth = totalWidth - separatorWidth * (n - 1);
            for (NSInteger i = 0; i < n; i++) {
                CGFloat sectionWidth = [picker rowSizeForComponent:i].width + sectionExceedWidth;
                panesWidth -= sectionWidth;
            }
            CGFloat leftPaneWidth = ceilf(panesWidth * 0.5f);
            CGFloat rightPaneWidth = panesWidth - leftPaneWidth;
            CGFloat totalHeight = picker.bounds.size.height;
            CGRect totalRect = CGRectMake(0, 0, totalWidth, totalHeight);
    

    Where the left and right panes widths are found and the separator size is static.

    This was pulled from here.

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

Sidebar

Related Questions

I would like to know what the best method is to calculate the width
I would like to know if it's possible, in a table where width=100%, and
Te be sure to understand I would like to know if with Razor is
I would like to know if phones with Android 2.3 or lower could download
I would like to know if JSON with AJAX has a limitation to the
Would like to know how to integarate cruise control with maven? Cruise Control comes
I would like to know how to safely update data when programming with Entity
I would like to know how can I output a number with 2 decimal
I would like to know how do I populate a TableView with data... All
I would like to know if someone knows why I can't send sms with

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.