Bubu4711
Bubu4711

Reputation:

Error: CLLocationManager headingAvailable

I have the following code:

In my .h-Header-File:

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
@interface Compass : UIViewController <CLLocationManagerDelegate> {
[...]
    CLLocationManager *locationManager;
}
[...]
@property(nonatomic, retain) CLLocationManager *locationManager;
@end

And my .m-File:

#import "[FILENAME].h"

[...]
@synthesize locationManager;

- (void)viewDidLoad {
[super viewDidLoad];

self.locationManager = [[[CLLocationManager alloc] init] autorelease];
if(locationManager.headingAvailable == NO) {
        [...]
    }
[...]
}

And I get the following error Message for "locationManager.headingAvailable": error:request for member 'headingAvailable' in something not a structure or union

I've added the CoreLocation framework to my app... Who can help me?

Upvotes: 0

Views: 829

Answers (1)

oxigen
oxigen

Reputation: 6263

This property available in iPhone OS 3.0 and later.

May be you try to use it in 2.2.1 ?

Upvotes: 1

Related Questions