Adding values to UIDatePicker?

Up vote 0 down vote favorite share g+ share fb share tw.

I need to add items to a UIDatePicker, but instead of adding dates: I need to add a list of names (e.g. , "James"). How do I do that? Iphone objective-c ios cocoa-touch uidatepicker link|improve this question edited Oct 24 '11 at 18:38Aravindhanarvi3,4133524 asked Oct 24 '11 at 18:20Illep818115 68% accept rate.

Just use UIPickerView UIPickerView *myPickerView = UIPickerView alloc initWithFrame:CGRectMake(0, 200, 320, 200); myPickerView. Delegate = self myPickerView. ShowsSelectionIndicator = YES; self.

View addSubview:myPickerView; - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { return 1; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { return 1; } - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { NSString *string = NSString stringWithString:@"Jack"; return string; } EDIT:1 - (NSInteger)selectedRowInComponent:(NSInteger)component { //Returns the index of the selected row in a given component. NSLog(@"%d",component); }.

If so what will the method body look like. I simply would require to NSLog the selected value. Please help – Illep Oct 24 '11 at 18:41 see the updated answer... – Aravindhanarvi Oct 24 '11 at 18:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions