【发布时间】:2012-03-12 16:37:05
【问题描述】:
我需要 MKMapView 的帮助。在地图中,我在点击图片后显示图片,显示带有最大图片和标题(AnnotationView)的弹出窗口,但我无法添加任何按钮......它们只是不起作用。然后我试试这个
cancelButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[cancelButton setImage:[UIImage imageNamed:@"map_dialog_cancel.png"] forState:UIControlStateNormal];
[cancelButton setFrame:CGRectMake(0.0 , 0.0, 25.0, 25.0 )];
[cancelButton addTarget:self action:@selector(cancelButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
self.leftCalloutAccessoryView = cancelButton;
self.canShowCallout = YES;
但是现在开始在我的自定义弹出窗口上方显示带有按钮的标准弹出窗口...如何在弹出窗口中放置关闭按钮?
【问题讨论】:
-
当系统允许时,将您的解决方案放在这里作为答案。您可以在适当的时候接受答案。
标签: iphone annotations popup mkmapview mkannotationview