我正在查看Apple的MapCallouts示例,用于地图注释和标注(==当您点击图钉时出现的气泡).每个注释都有坐标,标题和副标题.我想在2行显示字幕,我试过:
- (NSString *)subtitle
{
return @"Founded: June 29, 1776\nSecond line text";
}
Run Code Online (Sandbox Code Playgroud)
但文本"第二行文字"保持在一行,使泡沫更宽.我明白了:

我还想将按钮的图像更改为我自己的图像,设置按钮的代码当前是这样的:
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
编辑:我尝试了7KV7的建议.按钮更改成功,但我仍然无法获得2行字幕.我的代码:
MKPinAnnotationView* customPinView = [[[MKPinAnnotationView alloc]
initWithAnnotation:annotation reuseIdentifier:BridgeAnnotationIdentifier] autorelease];
customPinView.pinColor = MKPinAnnotationColorPurple;
customPinView.animatesDrop = YES;
// Button
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0, 0, 23, 23);
button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
//UIEdgeInsets titleInsets = UIEdgeInsetsMake(7.0, -20.0, 7.0, 7.0);
//button.titleEdgeInsets = titleInsets;
[button setImage:[UIImage imageNamed:@"ic_phone_default.png"] forState:UIControlStateNormal];
//[button setImage:[UIImage imageNamed:@"ic_phone_selected.png"] forState:UIControlStateSelected];
[button setImage:[UIImage imageNamed:@"ic_phone_selected.png"] forState:UIControlStateHighlighted];
[button addTarget:self action:@selector(showDetails:) …Run Code Online (Sandbox Code Playgroud) 任何人都知道是否有一个按钮到注释?
我希望这个位置可以选择 - 所以你可以说..选择位置并通过点击按钮获取该位置的所有事件.
这可能吗?
女://
1.)我需要在地图上有一个蓝色的圆圈/位置点,如下所示.

2.)如何在弹出屏幕上显示如下箭头?
