iOS 自定义百度地图标注气泡

来源:互联网 发布:深入浅出node.js epub 编辑:程序博客网 时间:2024/04/30 05:01

//自定义百度地图的弹出气泡

UIView *_areaPaoView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 240, 40)];

_areaPaoView.backgroundColor=[UIColor clearColor];

UIImageView *imageview = [[UIImageView alloc]initWithFrame:CGRectimageview.image = [UIImage imageNamed:@"1.png"];

[_areaPaoView addSubview:imageview];

UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(40, 0, 160, 20)];

lable.backgroundColor = [UIColor blackColor];

lable.textColor = [UIColor whiteColor];

lable.text = @"";

lable.alpha = 0.8;

[_areaPaoView addSubview:lable];

UILabel *lable1 = [[UILabel alloc]initWithFrame:CGRectMake(40, 20, 160, 20)];

lable1.backgroundColor = [UIColor blackColor];

lable1.textColor = [UIColor whiteColor];

lable1.text = @"";

lable1.font = [UIFont systemFontOfSize:13];

lable1.alpha = 0.8;平

[_areaPaoView addSubview:lable1];


UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(200, 0, 40, 40)];

button.backgroundColor = [UIColor blackColor];

[button setTitle:@">" forState:UIControlStateNormal];

[_areaPaoView addSubview:button];

BMKActionPaopaoView *paopao=[[BMKActionPaopaoView alloc] initWithCustomView:_areaPaoView];

annotationView.paopaoView=paopao;


  1. 手机赚钱,微信平台关注

0 0