2
之前,我得到這個錯誤:錯誤:預期 ')' 'CLLocation'
error: expected ')' before '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
的代碼,我覺得很好,我認爲這個問題是庫,但我之前添加了框架但不起作用。
可能是什麼問題?
歡迎SO。如果您使用「{}」按鈕,它會將您的代碼封裝成非常漂亮的格式,讓人們更容易幫助您解決問題。這次我爲你照顧它。 –
'CLLocation'在該代碼中出現多次。哪條線路發生錯誤? – Jim