UIPickerView in iphone
Posted
by Harita
on Stack Overflow
See other posts from Stack Overflow
or by Harita
Published on 2009-09-01T08:51:08Z
Indexed on
2010/06/16
14:02 UTC
Read the original article
Hit count: 183
hi, i am making an application of iphone, in which i have a table view, on every row of table view i have created a button programmatically & on its click method am showing picker view. Picker view showing perfectly, on picker view's toolbar i have 2 barbuttonitem named Done & Cancel. i have added below code in Picker view's delegate method
but button title is not changing with this delegate method
static int _selectedRow;
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
NSString *title = [pickarray objectAtIndex:_selectedRow];
//[pickarray removeObjectAtIndex:_selectedRow];
[pickarray insertObject:title atIndex:_selectedRow];
[table reloadData];
}
Any ideas how to show selected row title on button?
© Stack Overflow or respective owner