私は(うまくいけば)少し問題があります。rightCalloutAccessoryView
ボタン方式。私はにプッシュしようとしnavigationcontroller
ますanother viewcontroller
が、うまくいきません。いつも黒い画面が表示されます。navigationBar
無効になっています
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
// ... code ...
pinAnnotationView.canShowCallout = YES;
UIButton *detailButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[detailButton addTarget:self action:@selector(showDetailView:) forControlEvents:UIControlEventTouchUpInside];
pinAnnotationView.rightCalloutAccessoryView=detailButton;
// ... code ...
}
ボタン:
-(IBAction)showDetailView:(UIButton *)sender
{
InfoViewController *infoView = [[InfoViewController alloc] init];
[self.navigationController pushViewController:infoView animated:YES];
NSLog(@"pushed Button!!!!!!");
}
私の目標:をViewController
押してdetailButton
、に押しInfoViewController
ます。
たぶんそれは私が見つけられない小さな間違いでした。