Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Locker

macrumors 6502
Original poster
I have a webpage which will generate a comma separated list of numbers. I want to get these numbers into an NSMutableArray. How would I go about doing so?
 
Assuming you've read the list into a string:
Code:
NSArray * list = [theString componentsSeperatedByString:@","];
To make a mutable version of that array:
Code:
NSMutableArray * mutableList = [NSMutableArray arrayWithArray:list];

Edit: That will make a list of strings though; if you want NSNumbers to be in the array, you'll probably have to loop through and change them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.