Guest User

Untitled

a guest
Jun 25th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
  2. let fetchResult = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: nil)
  3. fetchResult.enumerateObjectsUsingBlock ({result, index, stop in
  4. if let asset = result as? PHAsset {
  5. if let location = asset.location {
  6. let lat = location.coordinate.latitude as Double
  7. let lng = location.coordinate.longitude as Double
  8. print("GPS:(lat),(lng)")
  9. }
  10. }
  11. })
  12. }
  13.  
  14. let fetchResult = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: nil)
  15.  
  16. let url = info[UIImagePickerControllerReferenceURL] as! NSURL
  17. let fetchResult = PHAsset.fetchAssetsWithALAssetURLs([url], options: nil)
Add Comment
Please, Sign In to add comment