Tag: ios5.1

iOS 5 JSONparsingCocoa错误3840的结果

我很难在iOS 5上parsing下面的JSONstring。 {"States": [{"Name": "Arizona","Cities": [{"Name": "Phoenix"}]},{"Name": "California","Cities": [{"Name": "Orange County"},{"Name": "Riverside"},{"Name": "San Diego"},{"Name": "San Francisco"}]},{"Name": "Nevada","Cities": [{"Name": "Las Vegas"}]}]} 这是我的代码: – (void) parseJson { NSError *jsonError = nil; NSData *jsonData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Locations-JSON" ofType:@"rtf"]]; if (jsonData) { NSDictionary *jsonObjects = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&jsonError]; if (jsonError) { NSLog(@"JSON Error: %@", [jsonError localizedDescription]); […]

编译失败:ld:重复的符号_OBJC_CLASS _ $ _ Algebra5FirstViewController

我通过iPhone模拟器运行我的应用程序时突然出现这个错误: 铿锵声:错误:链接器命令失败,退出代码1(使用-v来查看调用): ld:重复符号_OBJC_CLASS _ $ _ Algebra5FirstViewController in … / Algebra5-anwcuftojtxtgkfootneeeqhwztj / Build / Intermediates / Algebra5.build / Debug-iphonesimulator / Algebra5.build / Objects -normal / i386 / ExercisesViewController.o and … / Algebra5-anwcuftojtxtgkfootneeeqhwztj / Build / Intermediates / Algebra5.build / Debug-iphonesimulator / PSLE Algebra5.build/Objects-normal/i386/PSLE_Algebra5FirstViewController.o for architecture i386 这是什么一回事呢?