I want to add string objects to an array inside for loop. Below is my code;
for (int i=0;i<[retrievedArray count];i++)
{
NSString *temp = [[retrievedArray objectAtIndex:i] OfficialName];
[detailPgArray addObject:temp];
}
I have 10 objects inside retrievedArray (not as direct strings, but as OfficialName)
But for some reason, at the end of the for loop, detailPgArray has 0 objects. Please help.
OfficialNameshould beofficialNameif you want to follow Objective-C naming conventions.