在MKMapview中的标注中滚动Tableview

时间:2013-08-12 14:11:54

标签: ios uitableview uiscrollview mkmapview

我在MKMapView中的标注内部遇到UITableView时遇到问题。标注是annotationView的子视图。当我在UItableview上拖动时,Map会捕获事件并移动地图而不是表格视图。这是我的代码:

-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view{
   CalloutView *detailsView = [[CalloutView alloc] initWithNibName:@"CalloutView" bundle:nil];
   detailsView.arrTitle=arrColTitle;
   detailsView.maxTitleWidthAllowed=60.0;
   [detailsView.view setFrame:CGRectMake(0, 0, 200, 200)];
   [view addSubview:detailsView.view];
}

CalloutView nib文件包含我正在讨论的tableview。

在这种情况下,甚至可以在uitableview上检测用户事件吗?

编辑:我改变了我的代码,看起来我可以将touchesbegan,touchesended,touchesmoved事件传递给tableview,这意味着我在uitableview上调用了这些事件。但它仍然没有滚动。

谢谢!

0 个答案:

没有答案