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拉

posted @ 2015-08-14 10:46  繁星ll  阅读(198)  评论(0编辑  收藏  举报