Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
- let fetchResult = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: nil)
- fetchResult.enumerateObjectsUsingBlock ({result, index, stop in
- if let asset = result as? PHAsset {
- if let location = asset.location {
- let lat = location.coordinate.latitude as Double
- let lng = location.coordinate.longitude as Double
- print("GPS:(lat),(lng)")
- }
- }
- })
- }
- let fetchResult = PHAsset.fetchAssetsWithMediaType(PHAssetMediaType.Image, options: nil)
- let url = info[UIImagePickerControllerReferenceURL] as! NSURL
- let fetchResult = PHAsset.fetchAssetsWithALAssetURLs([url], options: nil)
Add Comment
Please, Sign In to add comment