Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.45 KB | None | 0 0
  1. func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
  2.      
  3.         guard let selectedImage = info[UIImagePickerControllerOriginalImage] as? UIImage else {
  4.             fatalError("Expected a dictionary containing an image, but was provided the following: \(info)")
  5.         }
  6.        
  7.         avatarImageview.image = selectedImage
  8.        
  9.         dismiss(animated: true, completion: nil)
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement