我想在目标 C 中获取 iPhone 上的经度和纬度。有人可以指导我如何以编程方式获取这些坐标吗?
#import <Foundation/Foundation.h>
@class CLLocationManager;
@interface CLLocationController : NSObject {
CLLocationManager *locationManager;
}
@property (nonatomic, retain) CLLocationManager *locationManager;
@end
当我写上面的代码时,我会看到以下错误
/Hab/Folder/Classes/CLLocationController.m:10:30: error: CLLocationManager.h: No such file or directory
/Hab/Folder/Classes/CLLocationController.m:21: warning: receiver 'CLLocationManager' is a forward class and corresponding @interface may not exist
/Hab/Folder/Classes/CLLocationController.m:22: error: accessing unknown 'delegate' component of a property