2

このエラーが発生します:

エラー:「CLLocation」の前に「)」が必要です

このコードで:

@protocol MyCLControllerDelegate <NSObject>
@required
- (void)locationUpdate:(CLLocation *)location; 
- (void)locationError:(NSError *)error;
@end

@interface MyCLController : NSObject <CLLocationManagerDelegate> {
    CLLocationManager *locationManager;
    id delegate;
}

@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic, assign) id <MyCLControllerDelegate> delegate;

- (void)locationManager:(CLLocationManager *)manager
    didUpdateToLocation:(CLLocation *)newLocation
           fromLocation:(CLLocation *)oldLocation;

- (void)locationManager:(CLLocationManager *)manager
       didFailWithError:(NSError *)error;

@end

コードは問題ないと思いますが、問題はライブラリですが、以前にフレームワークを追加しましたが、機能しません。

何が問題になる可能性がありますか?

4

1 に答える 1

7

インポートしましたか?

ファイルの先頭で、次のように移動します。

#import <CoreLocation/CoreLocation.h>
于 2011-03-03T21:45:47.120 に答える