Created
September 1, 2014 15:59
-
-
Save ivangodfather/d122c506a43ed0376aa8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [message.image getDataInBackgroundWithBlock:^(NSData *data, NSError *error) { | |
| image = [UIImage imageWithData:data]; | |
| dispatch_async(dispatch_get_main_queue(), ^{ | |
| cell.photoImageView.image = image; //this not | |
| [self.cameraButton setBackgroundImage:image forState:UIControlStateNormal]; //this changes | |
| }); | |
| }]; | |
| /*! | |
| Asynchronously gets the data from cache if available or fetches its contents | |
| from the Parse servers. Executes the given block. | |
| @param block The block should have the following argument signature: (NSData *result, NSError *error) | |
| */ | |
| - (void)getDataInBackgroundWithBlock:(PFDataResultBlock)block; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment