I am writing some code to allow users to answer multiple choice questions. So I have an NSArray of values [@”value1″, @”value2″, ..]
I want to display them as:
A) value1
B) value2
The code I have is
for(int i = i; i < [values count]; i = i+1) {
NSString *displayValue = [[NSString alloc] initWithString:<NEED HELP HERE>];
displayValue = [displayValue stringByAppendingString:@") "];
displayValue = [displayValue stringByAppendingString:[values objectAtIndex:i];
}
The question I have is if there is where I have put , how could I convert i to the right ASCII character (A, B, C, etc) and initialize the string with that value
and to get the whole string at once, use:
(ps. if you
allocan object, you must alsoreleaseorautorelease, or you will “leak” memory)