2009-07-28 10 views
0

Ich habe den folgenden Code:Fehler: CLLocationManager headingAvailable

In meinem .h-header-Datei:

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

Und meine .m-Datei:

#import "[FILENAME].h" 

[...] 
@synthesize locationManager; 

- (void)viewDidLoad { 
[super viewDidLoad]; 

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

Und ich Die folgende Fehlermeldung für "locationManager.headingAvailable": Fehler: Anforderung für Element "headingAvailable" in etwas nicht eine Struktur oder Union

Ich habe das CoreLocation-Framework zu meiner App hinzugefügt ... Wer kann mir helfen?

Antwort

1

Diese Eigenschaft ist in iPhone OS 3.0 und höher verfügbar.

Vielleicht versuchen Sie es in 2.2.1 zu verwenden?

Verwandte Themen