2013-05-30 34 views
0

地图视图打开时是否可以显示注解?我查看了其他代码段,但它们都涉及objectAtIndex,并且我没有使用tableview来进行此选择。地图视图打开时显示注释

这里是我使用的选择来看,这是应该打开,当我点击一个按钮的代码:

Screen1ViewController 

- (IBAction)mapPressed1:(UIButton*)sender 
{ 
mapnew *controller1 = [[[mapnew alloc] initWithNibName:@"mapnew" bundle:nil] autorelease]; 
controller1.delegate = self; 
controller1.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; 
[self presentViewController:controller1 animated:YES completion:nil]; 

// IS IT POSSIBLE TO DO SOMETHING LIKE THIS INTO THE IBACTION FOR IT TO WORK: 
[self.mapView selectAnnotation:NameOfAnnotationForSpecificLocationCoordinates animated:YES]; 
} 

是应该在一个按钮,点击打开地图应该能够识别点击来自何处,并打开正确的注释。地图上的每个点都分配了一个名称。

任何帮助表示赞赏。 感谢

+0

你是指注解(地图上的别针)还是标注(当有人点击标注时通常显示的弹出窗口)? – Craig

+0

我的意思是在注释中注释,但注释中的示例与注释中的示例一样好。 – parisianastro97

回答

相关问题