I am working on an iphone app in IOS5 that user storyboards. I have created a storyboard that uses mapkit with annotation callouts. I was able to wire up push segues for buttons and table row selections using the Storyboard editor. I have experience with custom callouts in MapKit, but can not figure out how to push a view controller that is defined in a storyboard from the callout. I was going to use [self.navigationController pushViewController:abc animated:YES]
, however, to do this I need to either get the view controller from the storyboard or initialize a new viewcontroller. I don't have access to the NIB name since there is no NIB name. How do I get access to an instance of a ViewController
defined in a storyboard? Is there some way to use the Storyboard editor to wire PUSH Seques to a custom map annotation callout?
Thanks in advance.
You can create segues between view controllers that are programmatically performed by control-dragging from one view controller to the other. Then in the
MKMapViewDelegate
method,- (void)mapView:annotationView:calloutAccessoryControlTapped:
, you can programmatically perform a segue as long as you have given the segue an identifier in the storyboard.