Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>getObjectInBackgroundWithId:block:</code> expects a Parse object ID for the <code>objectId</code> parameter.</p> <p>If you're simply creating the object and then trying to pass it through to a child view controller, it might be better to pass through the actual <code>PFObject</code>.</p> <pre><code>//In your header @property (nonatomic, strong) PFObject *message; //Implementation (IBAction)createGroup:(id)sender { PFObject *message = [PFObject objectWithClassName:@"Messages"]; [message setObject:self.recipients forKey:@"recipientIds"]; [message saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { if (error) { NSLog(@"Error %@ %@", error, [error userInfo]); } else { self.message = message; [self performSegueWithIdentifier:@"showDate" sender:self]; } }]; } </code></pre> <p>You'll need to implement <code>prepareForSeque:sender:</code> in your view controller, and then pass the PFObject through to the child view controller:</p> <pre><code>- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"showDate"]) { YourChildViewController *destViewController = segue.destinationViewController; destViewController.message = self.message; } } </code></pre> <p>Then in your child view controller:</p> <pre><code>//In the header, create a property to hold the message object @property (nonatomic, strong) PFObject *message; //In the body, you can use self.message [self.message setObject:file forKey:@"file"]; [self.message setObject:fileType forKey:@"fileType"]; [self.message saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { ... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload