导入库 #import <CoreLocation/CoreLocation.h> 设置 plist文件 在要获取定位的控制里面,遵守代理 CLLocationManagerDelegate 创建需要属性 开启定位功能 获取当前位置