《iOS开发:委托、地图与文本输入详解》
1. 委托与核心定位
在开发过程中,可能会遇到链接器错误。例如,若编译器知道 CLLocationManager (因为导入了头文件),但链接器找不到定义它的目标文件,就会出现此类错误。解决办法是将 Core Location 框架重新添加到项目中。
协议是方法的列表,下面是 CLLocationManagerDelegate 协议的示例:
@protocol CLLocationManagerDelegate<NSObject>
@optional
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation;
- (void)locationManager:(CLLocationManager *)manager
didUpdateHeading:(CLHeading *)newHeading;
- (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager;
- (void)locationManager:(CLLocationManager *)manager
didFailWithError:(NSEr
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



