我正在尝试创建一个NSMutableArray
,它将成为UIPickerView
的dataSource,但没有任何东西被添加到数组中,控制台只显示(。我做错了什么?
NSMutableArray *arr = [[NSMutableArray alloc] init];
PFQuery *rejectedNumber = [PFQuery queryWithClassName:@"Group"];
[rejectedNumber findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!objects) {
// Did not find any UserStats for the current user
NSLog(@"NotFound");
} else {
for (int i=0;i<[objects count];i++)
{
PFObject * obj = [objects objectAtIndex:i];
self.theObject = obj;
NSString *string = obj[@"GroupName"];
[arr addObject:string];
NSLog(@"GOGOGO%@", arr);
}