我收到此错误:
错误:“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
代码,我认为很好,我认为的问题是库,但是我之前添加了框架,但是不起作用。
可能是什么问题?
最佳答案
你进口了吗?
在文件的顶部,转到:
#import <CoreLocation/CoreLocation.h>
关于iphone - 错误:“CLLocation”之前的预期“)”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5186928/