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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:01:08+00:00 2026-06-12T13:01:08+00:00

I have to create a UIPickerView with 14-16 components. Everything initializes and works great,

  • 0

I have to create a UIPickerView with 14-16 components. Everything initializes and works great, however, I get a weird black bar on the right (see image) that wastes already tight space.

Is there a way to get rid of it? Is there also a way to get rid of all black spacing between the components and gray lines inside the components?

Thank you.

enter image description here

(UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:     
(NSInteger)component reusingView:(UIView *)view
{
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
    [label setText:[numArray objectAtIndex:row]];
    [label setTextAlignment:UITextAlignmentCenter];
    [label setFont:[UIFont boldSystemFontOfSize:14]];
    [label setBackgroundColor:[UIColor clearColor]];
    return label;
}
  • 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-12T13:01:09+00:00Added an answer on June 12, 2026 at 1:01 pm

    What is the width of your picker views? How did you set the width?
    Is width fixed or did you use something like
    (landscape mode in mind)
    CGRectGetHeight([UIScreen mainScreen].applicationFrame) // use this as width in landscape mode

    Then you would divide that width with number of picker views (14-16).
    With that width of picker views you shouldnt have that black bar.

    If you did do what i just wrote already, and i guess you did,
    then that may be status bar space if you created all that programatically (as you have).
    When creating ui components outside storyboards, some components position themselves at 0.0f, 20.0f for status bar. Some of them are UINavigationController.

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

Sidebar

Related Questions

I don't have any idea how can I create a custom UIPickerView with an
I have create my own NSOpenGLView class, right now the data that i want
I have an iPhone application with a UIPickerView with 6 components that displays numbers
i have create dynamic datepicker inside gridview. i want to know how to get
So my UIPickerView does not get connected to the DataSource. I Have no idea
I have create a function which to send mail. Its works when I invoke
I have the following code to create a UIPickerView: pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f,
I have a UIPickerView with 3 components, I need the first 2 components to
I have create a database class and packaged some methods. However, once build the
I have create a directory uploads in the Content directory and inside the uploads

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.