I have a uipickerview, which has a dictionary as a datasource.
I want to be able to update every single row of this picker view, and add a number at the end, I started by trying to update every row, but it doesn’t seem like its working.
I add an item to the dictionary like this:
[[dataBundleDictFinal objectForKey:@"BundleDisplayNames"] addObject:@"New row!"];
“New row!” is the text that appears in the pickerview
Then I’m trying to update every row, to say “hello”, I try something like this:
for(NSInteger i; i < numofrows; i++) {
[[dataBundleDictFinal objectForKey:@"BundleDisplayNames"] setObject:@"hello" atIndex:(NSUInteger)i];
}
but this does not change the pickerview even though I reload it afterwards. Am I doing something wrong while updating the dictionary, or is it some kind of other problem with the pickerview ?
Thank you
It looks like the loop initialization is missing: