#iOS全英文地图# 混搭mapkid+SDK, 开发全英文地图

下面是来客网 jb51.cc 通过网络收集整理的代码片段。

来客网小编现在分享给大家,也给大家做个参考。

  //申请定位权限- (void) initLocation
{
    if(nil ==_locationManager)
    {
       _locationManager = [[CLLocationManager alloc] init];
   
    }
   
    if([[[UIDevicecurrentDevice] systemVersion] floatValue] >= 8.0)
    {
       [_locationManager requestAlwaysAuthorization];
    }
}
 
//初始化MapView
- (void) initMapView{
   
    //构造MKMapView
    _mapView =[[MKMapView alloc] initWithFrame:CGRectMake(0,21,CGRectGetWidth(self.view.bounds),CGRectGetHeight(self.view.bounds))];
    _mapView.delegate= self;
   
    _mapView.showsUserLocation= YES;//显示定位图标
   
    [_mapViewsetUserTrackingMode:MKUserTrackingModeFollow];//设置定位模式
   
    //将mapview添加到Subview中
    [self.viewaddSubview:_mapView];
 
}

以上是来客网(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得来客网网站内容还不错,欢迎将来客网网站推荐给程序员好友。

以上是来客网为你收集整理的#iOS全英文地图# 混搭mapkid+SDK, 开发全英文地图全部内容,希望文章能够帮你解决#iOS全英文地图# 混搭mapkid+SDK, 开发全英文地图所遇到的程序开发问题。

如果觉得来客网网站内容还不错,欢迎将来客网网站推荐给程序员好友。