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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:05:53+00:00 2026-05-28T20:05:53+00:00

I have a table view & I have to display text fields in some

  • 0

I have a table view & I have to display text fields in some cells. When user click on the text field, I want the picker view to be displayed with integer values from 0 to 99. once the user selects the item in picker view the same needs to be displayed on that particular text field. Any help would be sincerely appreciated.

  • 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-28T20:05:54+00:00Added an answer on May 28, 2026 at 8:05 pm
       -(void) viewDidLoad
     {
    arrayNo = [[NSMutableArray alloc] init];
    [arrayNo addObject:@"1"];
    [arrayNo addObject:@"2"];
    [arrayNo addObject:@"3"];
    // and so on....
      }
    

    Add target of this line to ur textfield function

      UITextfield *entered2;
      //..... some codes
       [entered2 addTarget:self action:@selector(showPicker)forControlEvents:UIControlEventEditingDidBegin];
    [myview addSubview:entered2];
    
    
    
    
      -(void) showPicker
      {
    [entered2 resignFirstResponder];
        pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0,240,220,0)];
    
    pickerView.delegate = self;
    pickerView.dataSource = self;
    pickerView.showsSelectionIndicator = YES;    
    
    [self.view addSubview:pickerView];  
    [pickerView release]; 
     }
    
     - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component 
       {
        return [arrayNo count];
       }
      - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
     return 1;  
       }
       - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
       {
    entered2.text=[arrayNo objectAtIndex:row];
    [pickerView removeFromSuperview];
       }
        - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component 
       {
    return [arrayNo objectAtIndex:row];
    [pickerView removeFromSuperview];
       }
       - (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component {
    int sectionWidth = 300;
    return sectionWidth;
         }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Table View Controller with cells. I want to update the text
I have a simple table which has a some information displayed. To view the
I have a table view controller with custom cells. In those cells i added
When I have a table view with some sections which have their own headers
In my iPhone application I have a table view. When user taps any row,
I have a table containing view/click records. The time is stored in a unix
I have some html stored in a table. here is some sample data <p><span
I have a table view that I am customizing and I am adding a
I have a table view that is managed by an NSFetchedResultsController. I am having
I have a table view controller which doesn't let me manually scroll to the

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.