Ios4 自定义地图注释详图索引图像
我可以使用标题、副标题、左侧的图像(leftCalloutAccessoryView)和右侧的按钮(rightCalloutAccessoryView)设置MKPinAnnotationView。Ios4 自定义地图注释详图索引图像,ios4,annotations,mapkit,callouts,Ios4,Annotations,Mapkit,Callouts,我可以使用标题、副标题、左侧的图像(leftCalloutAccessoryView)和右侧的按钮(rightCalloutAccessoryView)设置MKPinAnnotationView。 使用此代码,我将图像设置在左侧: UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Icon.png"]]; myImageView.frame = CGRectMake(0, 0
使用此代码,我将图像设置在左侧:
UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Icon.png"]];
myImageView.frame = CGRectMake(0, 0, 10, 10);
customPinView.leftCalloutAccessoryView = myImageView;
[myImageView release], myImageView = nil;
结果如下:
但是我想得到这样的东西:
图像与字幕对齐的位置 你怎么能得到它
Thx.这将需要使用自定义注释视图。在开发者资源中有大量关于这方面的文档。无法使用默认注释样式进行图像对齐