日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

ios点击大头针气泡不弹出_百度地图使用(二)自定义大头针和弹出气泡

發布時間:2025/4/17 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ios点击大头针气泡不弹出_百度地图使用(二)自定义大头针和弹出气泡 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

百度地圖使用(二)自定義大頭針和彈出氣泡

(2014-08-19 10:37:09)

標簽:

時尚

分類:

IOS

http://www.aichengxu.com/article/系統優化/11497_12.html

// 根據anntation生成對應的View

- (BMKAnnotationView *)mapView:(BMKMapView *)mapView viewForAnnotation:(id )annotation

{

NSString *AnnotationViewID = [NSString stringWithFormat:@"renameMark%d",i];

newAnnotation = [[BMKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationViewID];

// 設置顏色

((BMKPinAnnotationView*)newAnnotation).pinColor = BMKPinAnnotationColorPurple;

// 從天上掉下效果

((BMKPinAnnotationView*)newAnnotation).animatesDrop = YES;

// 設置可拖拽

((BMKPinAnnotationView*)newAnnotation).draggable = YES;

//設置大頭針圖標

((BMKPinAnnotationView*)newAnnotation).image = [UIImage imageNamed:@"zhaohuoche"];

UIView *popView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 100, 60)];

//設置彈出氣泡圖片

UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"wenzi"]];

image.frame = CGRectMake(0, 0, 100, 60);

[popView addSubview:image];

//自定義顯示的內容

UILabel *driverName = [[UILabel alloc]initWithFrame:CGRectMake(0, 3, 100, 20)];

driverName.text = @"張XX師傅";

driverName.backgroundColor = [UIColor clearColor];

driverName.font = [UIFont systemFontOfSize:14];

driverName.textColor = [UIColor whiteColor];

driverName.textAlignment = NSTextAlignmentCenter;

[popView addSubview:driverName];

UILabel *carName = [[UILabel alloc]initWithFrame:CGRectMake(0, 25, 100, 20)];

carName.text = @"京A123456";

carName.backgroundColor = [UIColor clearColor];

carName.font = [UIFont systemFontOfSize:14];

carName.textColor = [UIColor whiteColor];

carName.textAlignment = NSTextAlignmentCenter;

[popView addSubview:carName];

BMKActionPaopaoView *pView = [[BMKActionPaopaoView alloc]initWithCustomView:popView];

pView.frame = CGRectMake(0, 0, 100, 60);

((BMKPinAnnotationView*)newAnnotation).paopaoView = nil;

((BMKPinAnnotationView*)newAnnotation).paopaoView = pView;

i++;

return newAnnotation;

}

分享:

喜歡

0

贈金筆

加載中,請稍候......

評論加載中,請稍候...

發評論

登錄名: 密碼: 找回密碼 注冊記住登錄狀態

昵???稱:

評論并轉載此博文

發評論

以上網友發言只代表其個人觀點,不代表新浪網的觀點或立場。

總結

以上是生活随笔為你收集整理的ios点击大头针气泡不弹出_百度地图使用(二)自定义大头针和弹出气泡的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。