gpt4 book ai didi

iphone - 错误 : expected ')' before 'CLLocation'

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:21:05 26 4
gpt4 key购买 nike

我收到这个错误:

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

代码,我觉得不错,我觉得是库的问题,但是我之前加了框架还是不行。

可能是什么问题?

最佳答案

你导入了吗?

在文件的顶部,转到:

#import <CoreLocation/CoreLocation.h>

关于iphone - 错误 : expected ')' before 'CLLocation' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5186928/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com