我有一段代码,其中我从表中检索一个数组并将其分配给另一个字符串数组。但是,字符串数组返回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);