Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
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:
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.