我有一个嵌套在UIScrollView中的GMSMapView。我已经关闭了GMSMapView的滚动功能
mapView.settings.tiltGestures = false
mapView.settings.scrollGestures = false
mapView.settings.rotateGestures = false但是,每当我试图滚动视图以使UIScrollView滚动时,什么也没有发生。我能做些什么来解决这个问题呢?
发布于 2016-10-12 02:43:23
在swift 3.0中
mapView.settings.setAllGesturesEnabled(false)发布于 2015-11-01 02:20:33
检测UIScrollView中的触摸手势(touch ->检测哪个视图被触摸,并据此启用/禁用UIScroll视图的滚动。
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
CGPoint locationPoint = [[touches anyObject] locationInView:self.view];
CGPoint viewPoint = [myImage convertPoint:locationPoint fromView:self.view];
if ([mapView pointInside:viewPoint withEvent:event]) {
disable scrolling
}
}https://stackoverflow.com/questions/33058682
复制相似问题