2009-07-28 1 views
0

私は次のコードを持っている:私の.h-ヘッダー・ファイルでエラー:CLLocationManager headingAvailable

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

そして、私の.m-ファイル:

#import "[FILENAME].h" 

[...] 
@synthesize locationManager; 

- (void)viewDidLoad { 
[super viewDidLoad]; 

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

をそして私が手次のエラー "locationManager.headingAvailable"のメッセージ: エラー:構造体または共用体ではないもののメンバー 'headingAvailable'に対するリクエスト

私のアプリケーションにCoreLocationフレームワークを追加しました... 誰が私を助けることができますか?

答えて

1

このプロパティは、iPhone OS 3.0以降で使用できます。

2.2.1で使用してみてください。

関連する問題