iOS 去除百度地图左下角log图标

2021-03-22  本文已影响0人  纵昂
   _mapView = [[BMKMapView alloc] init];
    [self.view addSubview:_mapView];
    [_mapView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.offset(0);
        make.top.equalTo(_topLineV.mas_bottom);
    }];
    _mapView.zoomLevel=15;//比例尺
    _zoomIndex = 15;
    [_mapView setMapType:BMKMapTypeStandard];//地图类型
    _mapView.showsUserLocation = YES;
    _mapView.delegate = self;

#pragma mark - 去除百度地图左下角log    -      关键代码复制即用
    UIView *mView = _mapView.subviews.firstObject;
     for (id logoView in mView.subviews)  {
         if ([logoView isKindOfClass:[UIImageView class]])      {
         UIImageView *b_logo = (UIImageView*)logoView;
             b_logo.hidden = YES;
            }
     }
 CLLocationCoordinate2D coor;
    coor.latitude = LATITUDE;
    coor.longitude = LONGITUDE;
  
    [_mapView setCenterCoordinate:coor animated:YES];
上一篇 下一篇

猜你喜欢

热点阅读