0

カスタム ポップアップを使用する必要があるマップ アプリケーションで作業しています。カスタム ビューを追加しましたが、カスタム ポップアップの位置を設定できません。

ここに私のコードがあります

- (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker {

UIView *view=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 156, 36)];
UIImageView *imgView=[[UIImageView alloc]initWithFrame:view.frame];
[imgView setImage:[UIImage imageNamed:@"markerBg.png"]];
[view addSubview:imgView];

UIImageView *imgRightArrow=[[UIImageView alloc]initWithFrame:CGRectMake(130, 13, 8, 10)];
[imgRightArrow setImage:[UIImage imageNamed:@"arrow1.png"]];
[view addSubview:imgRightArrow];


UILabel *lbl=[[UILabel alloc]initWithFrame:CGRectMake(20, 0, 110, 36)];
[lbl setText:marker.title];
[lbl setBackgroundColor:[UIColor clearColor]];
[lbl setTextColor:[Utility getColor:@"00AAE8"]];
[lbl setFont:[UIFont systemFontOfSize:12.0f]];
[view addSubview:lbl];




return view;

}

結果イメージ オリジナル今へ

4

1 に答える 1