iOS将我们自己的位置分享给其他人?

时间:2016-05-03 10:48:25

标签: ios objective-c google-maps uibutton mkmapview

  • 点击“按钮”
  • 分享我们的“位置”
  • 我想share我们的 current location 从自我'viewcontroller'到Next view controller
  • whatsApp FaceBook location Sharing

    一样

    可以分享我们自己的位置吗?

1 个答案:

答案 0 :(得分:4)

·H

   CLLocationManager *locationManager;

的.m

locationManager = [[CLLocationManager alloc] init];
locationManager.distanceFilter = kCLDistanceFilterNone;
locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters;
[locationManager startUpdatingLocation];
[locationManager requestWhenInUseAuthorization];

latitude = locationManager.location.coordinate.latitude;
longitude = locationManager.location.coordinate.longitude;

将它发送到你想要的地方。