swift - How to I extract a PHAsset's Location property? -


xcode says phasset doesn't have 'location' member.

what's remedy swift?

enter image description here

short answer: might have forgotten import corelocation;

import photos import corelocation  let asset: anyobject? = nil  if let asset = asset as? phasset {     let location = asset.location } 

when remove corelocation import, can replicate error.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -