Am trying to figure out how to do this….
I have an NSMutable array populated from an RSS feed as follows :
Item 1 (date, title, description)
Item 2 (date, title, description)
Item 3 (date, title, description)
etc….
What I’m trying to do, is loop through it and create a string for use in an
animated ticker as follows :
Item 1 Date – Item 1 Title [a few spaces] Item 2 Date – Item 2 Title [a few spaces] etc…..
I understand how to extract a single element from the array – for example :
NSString *testString1 = [[_parseResults objectAtIndex:0] objectForKey:@"date"];
NSString *testString2 = [[_parseResults objectAtIndex:0] objectForKey:@"title"];
but am stumped as to the best way to loop through the whole thing and construct the combined string – ie Item 1 Date + “-” + Item 1 Title + Item 2 Date + “-” + Item 2 Title etc ?
You may use fast enumeration, let compiler choose the optimal way to go through your array elements.