开发者

My program will not show a navigationBar after rightaccessoryview has been clicked. It only shows the view but not the navigationalBar

开发者 https://www.devze.com 2023-03-06 02:49 出处:网络
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control{
   - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:    (UIControl *)control{
        NSL开发者_运维问答og(@"Disclosure button pressed");
        DetailView *tmpView = [[DetailView alloc]initWithNibName:@"DetailView" bundle:nil];
        self.detailViewController = tmpView;

        [self.navigationController pushViewController:self.detailViewController animated:YES];
        //[self.view addSubview:detailViewController.view];
        [tmpView release];
    }


Are you sure the navigation controller exists in current view controller from where you click on the map annotation? Make sure self.navigationController is not nil.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号