當我使用segues推送視圖(直接通過在故事板上拖動它)可以正常工作,並且加載下一個視圖。然而,當我嘗試實現這一切編程推視圖時我對PIN的右箭頭點擊(在地圖),我有點困惑:pushViewController無法以編程方式與故事板一起工作
編輯
-(void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
NSLog(@"calloutAccessoryControlTapped: enseigneDeLaStation");
[self performSegueWithIdentifer:@"You identifier" sender:self];
}
我得到這個錯誤:
Receiver Type 'MyFirstViewController' for instance message does not declare a method with selector performSegueWithIdentifer:sender:
嗨Pfitz,請你說明一個使用例子嗎? thanx – Malloc 2012-01-09 13:20:01
Hi @Malek。我更新了我的答案,並希望現在更清楚 – Pfitz 2012-01-09 13:54:28
Pfitz,實際上,我在評論之前嘗試了它,但出現錯誤:實例消息的Receiver Type'MyFirstViewController'沒有聲明與選擇器相關的方法performSegueWithIdentifer:sender:',also also ,我嘗試在使用地圖時單擊PIN的右箭頭時推送視圖,因此我的代碼位於'calloutAccessoryControlTapped'方法中,我將更新我的帖子以使我的問題清晰。 – Malloc 2012-01-09 14:05:23