iOS开发UIScrollView的touchesBegan和touchesEnd
touchesBegan跟touchedEnd]有提供oUIScrollViewDelegate
所以要自己建立一^承自UIScrollView的class
重@method
myScrollView.h
@interface myScrollView : UIScrollView @end
myScrollView.m
-(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]; } }
相关推荐
源码在手 2013-04-11
fanleiym 2011-11-19
fanxiaoxuan 2014-04-08
leitingdulante 2013-03-29
软件设计 2017-09-14
手机开发 2017-03-10