在Mkannotation图像上添加Labeltext
|
我正在使用带有自定义placeMark的MKMapView,它具有NSString值,我想将其作为标签添加到mkannotationview图像。
- (MKAnnotationView *)mapView:(MKMapView *)MapView viewForAnnotation:(MyPlaceMark *)annotation{
static NSString* AnnotationIdentifier = @\"AnnotationIdentifier\";
MKAnnotationView* MyView = [[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier] autorelease];
MyView.canShowCallout=YES;
MyView.image = [UIImage imageNamed:@\"MyImage.png\"];
return MyView;}
这是获得它的最佳方法,我尝试在图像上添加标签,但是CGRect出现问题,我一无所获,不知道如何制作它
谢谢!
没有找到相关结果
已邀请:
1 个回复
倾坞髓