ios-晋级之路 在模拟器中测试定位
添加这段代码
@interface CLLocationManager (Simulator)
@end
@implementation CLLocationManager (Simulator)
-(void)startUpdatingLocation
{
float latitude = 32.061;
float longitude = 118.79125;
CLLocation *setLocation= [[CLLocation alloc] initWithLatitude:latitude longitude:longitude] ;
[self.delegate locationManager:self didUpdateToLocation:setLocation
fromLocation:setLocation];
}
@end
就ok拉