表视图单元格内的地图视图
我还有另一个关于地图视图的问题(可能没有答案)。我在表视图单元格内有一个地图视图,如果滚动在地图视图中开始,我想禁用表视图滚动。缩放手势也无法正常工作。仅当缩放手势在 iPhone 显示屏上水平完成时,它才起作用。滑动手势也会发生同样的情况。如果我水平滑动地图区域,它只会影响地图。如果我垂直滑动,表格视图就会滚动,我想禁用它。有什么ide如何做吗?
i have another (probably unanswered) question about map views. I have a map view inside a table view cell and i want to disable the table view scrolling if the scrolling begins in the map view. Also the zooming gesture does not function normally. It only functions if the zooming gesture is done horizontally on the iphone display. The same thing happens with swiping gestures. It only affects the map if i swipe the map area horizontally. If i swipe vertically the table view scrolls instead, and i want to disable that. Any ides how to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,我无法解决它。在新的 iphone os 4.0 beta 中,它按照我预期的方式工作。在地图视图内部滚动会滚动地图视图,滚动表视图,在地图视图外部滚动会滚动表视图。滚动对我来说并不重要,所以现在滚动被禁用。但我发现 这些位于 SDK v3.2 的更改说明中。有 UIGestureRecognizer 基类并且有一个具体的 UIPanGestureRecognizer不知道它们有多有用,但如果我有更多时间,我会尝试一下。我会尝试检测缩放和移动手势,并使用从这些识别器获得的数据更新地图视图。
No i wasn't able to resolve it. In the new iphone os 4.0 beta it is working the way i expected it to work. Scrolling inside the mapview scrolls the mapview and scrolling the table view, outside the mapview scrolls the table view. Scrolling in wasn't that important to me so now scrolling is disabled. But I found these in the change notes for v3.2 of the SDK. There is the UIGestureRecognizer base class and there is a concrete UIPanGestureRecognizer Don't know how useful they are but I would try them if I had more time. I would try to detect zooming and moving gestures and would update the mapview with the data i got from these recognizers.
好吧,我不是 100% 确定,但我认为您可以使用以下方法停止滚动:
UITableView.scrollEnabled = NO;
另外,我也很确定您不能在 CustomTableCell 上使用手势,尽管有可能是解决这个问题的方法。
我希望这至少能让您对这个主题有一点了解。
Ok, I'm not 100% sure but I think you can stop the scrolling using:
UITableView.scrollEnabled = NO;
Also, I'm also pretty sure that you cannot use Gestures on a CustomTableCell although there may be work arounds for this.
I hope that has shed at least a little bit of light on the subject for you.