objective c - IOS Obj-C extracting latitude from CLLocation -
i'm updating obj-c project, , model "upload model" made cllocation
of similar this: nslog output:
<+38.03744507,+122.80317688> +/- 0.00m (speed -1.00 mps / course -1.00) @ 8/23/16, 9:44:41 pm central european summer time
so assume extract data this:
cllocation *lat = self.currentuploadpackage.placelocation.coordinate.latitude;
i placelocation
, xcode claims doesn't contain coordinate
nor latitude
(/users/user/development/app/sharedescriptionviewcontroller.m:92:37: property 'latitude' cannot found in forward class object 'cllocation')
how go getting long/lat data cllocation
mentioned above? or hints.
(ps: not objc, focused on swift)
note error mentions "forward class object 'cllocation'".
this means use @class cllocation
somewhere (probably in .h file). doesn't provide details cllocation
other class.
to fix code need import proper .h file in .m file tries access properties of cllocation
.
#import <corelocation/cllocation.h>
Comments
Post a Comment