iOS8以前使用CoreLocation定位 1、首先定义一个全局的变量用来记录CLLocationManager对象,引入CoreLocation.framework使用#import 1 @property (nonatomic, strong) CLLocationManager *locationManager; 2、初始化CLLocationManager并开始定位。