2
嗨,我使用谷歌地图中,我想用标志像下面的图片 IOS谷歌地图自定义标记
我已经做了代码
UIView *markerview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 55, 102)];
markerview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"glow-marker2.png"]];
UIImageView *imgview = [[UIImageView alloc] initWithFrame:CGRectMake(4, 4, 47, 70)];
imgview.backgroundColor = [UIColor whiteColor];
imgview.contentMode = UIViewContentModeScaleAspectFit;
imgview.image = img;
imgview.layer.cornerRadius = 7;
imgview.layer.masksToBounds = YES;
[markerview addSubview:imgview];
marker.icon = [self imageWithView:markerview];
marker.map = mapview;
它给我输出
谁能告诉我为什么这黑色背景来了?如何解决?