Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
新建一个类继承自UIScrollView 并重写下面的方法
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[super touchesBegan:touches withEvent:event];
if ( !self.dragging )
{
[[self nextResponder] touchesBegan:touches withEvent:event];
}
}
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
[super touchesEnded:touches withEvent:event];
if ( !self.dragging )
{
[[self nextResponder] touchesEnded:touches withEvent:event];
}
}
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/164180.html原文链接:https://javaforall.net