Hello,
I am just trying out Core Location for fun and I am having some problems.
I am trying to get the latitude of where I am but it is not working. There is no error, the problem is that my latitude displays as 0. Here is my code:
In my header file the only property I have set is the location property. I set the property like this:
Does anyone know why my latitude shows as 0? I am sure it is something simple I forgot.
Thanks
I am just trying out Core Location for fun and I am having some problems.
I am trying to get the latitude of where I am but it is not working. There is no error, the problem is that my latitude displays as 0. Here is my code:
Code:
-(void)awakeFromNib{
NSString *lattitude = [[NSString alloc]initWithFormat:@"%g",location.coordinate.latitude];
[locationField setStringValue:lattitude];
}
In my header file the only property I have set is the location property. I set the property like this:
Code:
@property(readonly NS_NONATOMIC_IOSONLY)CLLocation *location;
Does anyone know why my latitude shows as 0? I am sure it is something simple I forgot.
Thanks