当我使用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