Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. queue: [NSOperationQueue mainQueue]
  2. completionHandler: ^( NSURLResponse *response, NSData *data, NSError *error ) {
  3. if(error)
  4. {
  5.  
  6. }
  7. else
  8. {
  9. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
  10. NSUserDomainMask, YES);
  11.  
  12. NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:path];
  13.  
  14. [data writeToFile:filePath atomically:YES];
  15.  
  16. }
  17. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement