【问题标题】:iOS Sharing our own location to Other? [closed]iOS 将我们自己的位置分享给其他人? [关闭]
【发布时间】:2016-05-03 10:48:25
【问题描述】:
  • 通过点击“按钮”分享我们的“位置”?
  • 我想share我们的current location从自己的'viewcontroller'到Next view controller
  • 就像 whatsAppFaceBook location Sharing

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

【问题讨论】:

  • 你的问题不清楚,你用的是MKMapview还是GoogleMap
  • 请提供有关您的问题的正确信息stackoverflow.com/help/how-to-ask
  • @Anbu.Karthik....使用 Gmaps/mapKit

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


【解决方案1】:

.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;

发送到你想要的地方。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-16
    • 1970-01-01
    相关资源
    最近更新 更多