So in your button action method, you can do something like this: (IBAction) showAlert { NSUInteger numComponents = myPickerView datasource numberOfComponentsInPickerView:myPickerView; NSMutableString * text = NSMutableString string; for(NSUInteger I = 0; I.
So in your button action method, you can do something like this: - (IBAction) showAlert { NSUInteger numComponents = myPickerView datasource numberOfComponentsInPickerView:myPickerView; NSMutableString * text = NSMutableString string; for(NSUInteger I = 0; I.
Thanks! SelectedRowInComponent is just what I needed. – WTP Sep 7 '09 at 15:36.
Delegate - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ selection=NSString alloc initWithFormat:@"You have selected: %@. ", theArray objectAtIndex:row; } //My Actions -(IBAction)selectingCat{ txtSelected setText: selection; selection release; } I find that this works for me on the delegate you give a previously NSString variable established in your header file the value that you want your button to use and then on your button all you have to do is assign that value to your textfield or label or whatever and release the NSString. Hope it helps.
I have an UIPickerView with 3 components populated with 2 NSMutableArrays (2 components have the same array). But I want to show the selected row for each component in an UIAlertView after the user touched an UIButton. Is there a way to do this?
Or must I just use 3 invisible UILabels as buffer?
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.