I have a project in xCode 4.2 using storyboards. I'm using the mapkit framework. I'm trying to position a popover by the annotation the user selected with a segue.
Here's what I have.
if([view.annotation isKindOfClass:[ContentPoint class]]) {
NSLog(@"I see this in my log");
[self performSegueWithIdentifier:@"ViewAudioSegue" sender:mapView.selectedAnnotations];
}
This calls the correct segue, but because the segue has an anchor of mapview, the popover displays at the botton of the map and not beside the selected annotation. I've tried different senders (view, map, etc.) but I get the same result. Is there a way to programmatically set the anchor? This is the error I get without manually setting the anchor "* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIStoryboardPopoverSegue must be presented from a bar button item or a view.'"