Showing UIPickerview selected value-Collection of common programming errors
I have a UIPickerView
which displays the array of items. When i select an item, it can be passed to all my view controller. Now my problem is after moving to different view controllers
and returned back to the UIPIckerView
it shows the first array item and not the item which i selected. How can i view the selected item?
//in viewDidLoad()
itemsArray = [[NSArray alloc] initWithObjects:@"5", @"10", @"20", @"30", @"50",@"100", nil];
// if i select 20 and moved to other pages of my controllers and
// return to the UIPickerView i can see the 5 as selected not the 20
Any suggestions?