AI智能
改变未来

iOS高德地图去logo

//网上大多数写法都是这样,但是不行
[_mapView.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj isKindOfClass:[UIImageView class]]) {

UIImageView * logoM = obj;logoM.layer.contents = (__bridge id)[UIImage imageNamed:@\"\"].CGImage;

// logoM.layer.contents = (__bridge id)[UIImage imageWithColor:[UIColor clearColor]].CGImage;
// logoM.hidden = YES;
}
}];
//用这个可以,,
for (UIView *view in _mapView.subviews) {
if ([view isKindOfClass:[UIImageView class]]) {
[view removeFromSuperview];
}
}

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » iOS高德地图去logo