我有这个:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSURL *url = [NSURL URLWithString:@"http://www.xyz.com/ios/responseScript.php"];
NSError *error = nil;
NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:NULL error:&error];
NSString *dataString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}
当我打印 dataString 时,它完全显示了我的期望,即
["Bannana","Apple","SomeCheese"]
我想把它处理成 NSMutableArray。我怎样才能做到这一点?
谢谢,