今天,我已经将我的xCode更新为4.2版本,而且我想禁用ARC,我也用谷歌搜索.但无法解决我的问题.根据搜索结果,在目标设置中,我找不到'Objective-C自动引用计数'项,因此没有机会将其设置为NO.我逐个找到该项目,并使用搜索字段.
一个人知道最新的Xcode4.2,如何禁用项目的ARC,而不是特定的文件.
非常感谢.
在5之前的Xcode版本中,我们可以在创建项目时在项目设置中禁用ARC.现在ARC给我带来了这个问题.
使用属性列表文件,对于读取步骤,编译器给出了一个错误:"ARC不允许将'int'隐式转换为'id'".我没有与Xcode 4相同的代码有这个问题.在我的属性列表文件中,键是数字,也在我的viewController.m中当我禁止ARC作为目标时,警告仍然存在.
我看不出如何添加编译器标志.代码(带法语字符串):
NSString *error;
NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *plistPath = [rootPath stringByAppendingPathComponent:@"Save.plist"];
NSArray *keys = [NSArray arrayWithObjects:@"valeurCompteur1", @"valeurCompteur2", @"valeurCompteur3", @"valeurCompteur4", @"valeurCompteur5", @"nomCompteur1", @"nomCompteur2", @"nomCompteur3", @"nomCompteur4", @"nomCompteur5", nil];
NSArray *objs = [NSArray arrayWithObjects: compteur1, compteur2, compteur3, compteur4, compteur5, nameC1, nameC2, nameC3, nameC4, nameC5, nil];
Run Code Online (Sandbox Code Playgroud)