Downloading images from Parse iOS

后端 未结 5 650
-上瘾入骨i
-上瘾入骨i 2021-01-06 16:50

I\'m writing an application that allows the users to take and store images on Parse. Thus far I\'ve managed to accomplish saving the image array to Parse by using the follo

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-06 17:26

    Did you try:

    PFQuery *query = [PFQuery queryWithClassName:@"SavedTanks"];
    [query whereKey:@"tankImages" equalTo:@"your_image.jpg"];
    [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
      if (!error) {
        // The find succeeded.
        NSLog(@"Successfully retrieved %d images.", objects.count);
        // Do something with the found objects
        for (PFObject *object in objects) {
            NSLog(@"%@", object.objectId);
        }
      } else {
        // Log details of the failure
        NSLog(@"Error: %@ %@", error, [error userInfo]);
      }
    }];
    

提交回复
热议问题