2013-05-30 31 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

回答

相關問題