Guest User

Untitled

a guest
May 21st, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. func richiamoImmagine()
  2. {
  3. let avatarFile = PFUser.currentUser()!["Avatar"] as! PFFile
  4. avatarFile.getDataInBackgroundWithBlock {
  5. (imageData:NSData?, error:NSError?) -> Void in
  6. if error == nil {
  7. if let finalimage = UIImage(data: imageData!) {
  8. self.avatarImage.image = finalimage
  9. }
  10. }
  11. }
  12. }
  13.  
  14. if let "variable" == avatarFile
  15.  
  16. if let finalimage = UIImage(data: imageData!) {
  17.  
  18. if error == nil && imageData != nil {
  19.  
  20. if let imageData = imageData where error == nil {
  21. if let finalimage = UIImage(data: imageData) {
  22. self.avatarImage.image = finalimage
  23. }
  24. }
  25.  
  26. if let avatarFile = PFUser.currentUser()?["Avatar"] as? PFFile {
  27.  
  28. }
Add Comment
Please, Sign In to add comment