Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios4 自定义地图注释详图索引图像_Ios4_Annotations_Mapkit_Callouts - Fatal编程技术网

Ios4 自定义地图注释详图索引图像

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

我可以使用标题、副标题、左侧的图像(leftCalloutAccessoryView)和右侧的按钮(rightCalloutAccessoryView)设置MKPinAnnotationView。

使用此代码,我将图像设置在左侧:


UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Icon.png"]];
myImageView.frame = CGRectMake(0, 0, 10, 10);
customPinView.leftCalloutAccessoryView = myImageView;
[myImageView release], myImageView = nil;

结果如下:


但是我想得到这样的东西:
图像与字幕对齐的位置

你怎么能得到它


Thx.

这将需要使用自定义注释视图。在开发者资源中有大量关于这方面的文档。无法使用默认注释样式进行图像对齐