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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:16:48+00:00 2026-05-18T08:16:48+00:00

How can i change number Of Rows In each Components i have this: –

  • 0

alt text

How can i change number Of Rows In each Components
i have this:

- (NSInteger) pickerView:(UIPickerView *)pickerView  numberOfRowsInComponent:(NSInteger)component
{
return 3;
}

BUT this change all of Components rows number,

And The next question is : How can i Change the values in third component Like UIDatePicker : for example: in Date (in january) days are 31 but (in February) days are (29/28) an the third components must change and values will be between 1-29 or 1-28.

  • 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-18T08:16:49+00:00Added an answer on May 18, 2026 at 8:16 am

    Every picker calls -pickerView:numberOfRowsInComponent: and asks it for the number of rows for each component. So this method is called three times, because you have three components. Thus you need to return different values for the components. You get an NSInteger in the component variable to indicate which component is asked for:

    - (NSInteger) pickerView:(UIPickerView *)pickerView  numberOfRowsInComponent:(NSInteger)component
    {
        switch(component) 
        {
            case 0: // first component has 42 rows
                return 42;
            case 1: // second component has 21 rows
                return 21;
            case 2: // third component has only two rows
                return 2;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I change this query to only return rows that return more than
How i can change the color with gradient??? I have this now,but is different
I have a table structure like this (vertical design). I can have unlimited number
I have a table where the user can add rows to it but each
How can replace arabic number with latin number as that doesn't change number into
In rml reports how can i change the current page number format from page:1
I have a number of table rows that I would like to toggle the
I have a container whose size can change. I will by dynamically creating instances
Similar: How can I delete duplicate rows in a table I have a feeling
So, I have two objects: A table with a number of rows and columns.

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.