Iphone 将一个数组分配给另一个数组-xcode/objective c

Iphone 将一个数组分配给另一个数组-xcode/objective c,iphone,xcode4,Iphone,Xcode4,我有一段代码,其中我从表中获取一个数组,并将其分配给另一个字符串数组。但是,字符串数组返回null 代码如下: NSArray *CalorieSet = [ActiveCaloriesDatabase database].ArrayofActivities; for (ActiveCalories *info in CalorieSet) { NSLog(@"in app delegate"); NSLog(@"%d: %@, %@", info

我有一段代码,其中我从表中获取一个数组,并将其分配给另一个字符串数组。但是,字符串数组返回null

代码如下:

   NSArray *CalorieSet = [ActiveCaloriesDatabase database].ArrayofActivities;
       for (ActiveCalories *info in CalorieSet) {
       NSLog(@"in app delegate");
       NSLog(@"%d: %@, %@", info.uniqueId, info.activity, info.calories);
       [_pickData addObject:info.activity];
       NSLog(@"array in the for loop %@", CalorieSet);
}

       NSLog(@"count here is %d", _pickData.count);

{NSLog(@“%d:%@,%@”,info.uniqueId,info.activity,info.carries);}行打印是否正确?对原始数组中的每个元素执行一次?它执行-除指定数组外的所有操作都是正确的。确定。最后一行是否打印为“此处计数为0”?
NSMutableArray*\u pickData=[NSMutableArray alloc]init]检查您是否编写了此语句!似乎
\u pickData
是向您发送nill的字符串数组。您
alloc
是您的数组吗?