I have this project with a UITextView that is to show my selections from a UIPickerView. I already can show the selection, but when I pick another selection it overwrites the previous one and I need to keep track of all selections I make.
Here is my code:
NSString *msg = [NSString stringWithFormat: @"Você comprou %@ %@ e pagará R$ %.2f.",
[quantidade objectAtIndex:[pickerView selectedRowInComponent:1]],
[produtos objectAtIndex:[pickerView selectedRowInComponent:0]], total];
texto.text = msg;
Anyone could help??? Thanks
A solution could be to create a instance variable in your view controller, a NSMutableString. Then, each time, you choose a new value from your picker view, just append new selection in your string, like :
In .h
In .m