在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出现问题,我一无所获,不知道如何制作它 谢谢!     
已邀请:
        注解视图绘制图像?在这种情况下,我将添加UILabel作为子视图。
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(x,y,width,height)];
[yourView addSubview:label];
[label release];
    

要回复问题请先登录注册