Google지도 API를 통해 특수 효과에 현재로드 한 데이터를 스토리 보드를 통해 세부보기 컨트롤러를 통해 전달하려고합니다.스토리 보드를 사용하여 특수 효과에서 상세보기 iOS로 데이터 전달
각 주석의 상세 정보 공개를 클릭하면 상세보기 컨트롤러가 제대로로드되지만 현재 전달 된 데이터를 가져 오려고합니다.
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
// Assuming I call the MapPoint class here and set it to the current annotation
// then I'm able to call each property from the MapPoint class but wouldn't
// I have to set this in the prepareForSegue but that would be out of scope?
MapPoint *annView = view.annotation;
// annView.name
// annView.address
[self performSegueWithIdentifier:@"showBarDetails" sender:view];
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if([[segue identifier] isEqualToString:@"showBarDetails"])
{
BarDetailViewController *bdvc = [self.storyboard instantiateViewControllerWithIdentifier:@"showBarDetails"];
//This parts confusing me, not sure how I obtain the data
// from the above mapView delegation method?
// annView.name = bdvc.name;
bdvc = segue.destinationViewController;
}
}
난 쉽게 스토리 보드와 펜촉 ..를 사용하지 않고이 작업을 수행 할 수있어하지만 난에 노력하고있어 순수 스토리 보드 사용법을 배웁니다. – user3117785