gps location

来源:互联网 发布:期货交易软件哪个好 编辑:程序博客网 时间:2024/04/29 13:33

1。 import <CoreLocation/corelocation.h>

2。load corelocation framework 

3。定义locationManager对像

4。设置locationManger属性

         delegate、desiredaccuracy、distancefilter

5。 开始定位

        [locationManager startUpdatingLocation];


6。 -(void) locationManger:  didfail.....定位失败回调

7。-(void)locationManager:  didUpdateToLocation 定位成功回调

原创粉丝点击