MKMapView Popup Bubble: show new xib on click
How do I load a new xib when my user taps on the popup bubble on an MkMapView?
I've tried scouring the interne开发者_JAVA百科t, but can't find a solution to this problem.
Many thanks in advance,
In the - (void)mapView:(MKMapView *)aMapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
method you should create a new VC with your xib and push it to the navigation controller or display it however you want.
For example:
- (void)mapView:(MKMapView *)aMapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control{
NewViewController* vc = [[[NewViewController alloc] initWithNibName:@"newXib" bundle:nil] autorelease];
[self.navigationController pushViewController:vc animated:YES];
}
You can find a lot of tutorials how to create and display new Views, you should start scouring harder. ;)
精彩评论