I’v run into such problem. I need to update the values in my NSArray. And don’t know a way to do it. Here’s my array
NSArray *arrayWithInfo = [[NSArray alloc] initWithObjects:AMLocalizedString(@"Status", nil),AMLocalizedString(@"Call", nil),AMLocalizedString(@"Location", nil),AMLocalizedString(@"Control", nil),AMLocalizedString(@"Sim", nil),AMLocalizedString(@"Object", nil),AMLocalizedString(@"Info", nil),nil];
self.dataArray = arrayWithInfo;
[arrayWithInfo release];
To be more specific I have tableview initialized with this array. There is a possibility for user to use different localized strings, so I have to update it. By using [tableview reloadData]; i’v got the table to update, but the values in NSArray stay the same as they were initialized in first place.
So how to make array look up at the strings once again and get their new values?
You should be using an NSMutableArray. Doing so will allow you to change its values after instantiation.