单击 rightaccessoryview 后,我的程序将不会显示导航栏。它只显示视图,但不显示导航栏
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped: (UIControl *)control{
NSLog(@"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];
}
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped: (UIControl *)control{
NSLog(@"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];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定导航控制器存在于您单击地图注释的当前视图控制器中吗?确保 self.navigationController 不为零。
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.