首页 > 其他 > 详细

UIScollView Touch事件

时间:2014-05-25 22:02:15      阅读:447      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
customScrollView.h

#import <UIKit/UIKit.h>

@interface customScrollView : UIScrollView

@end

customScrollView.m

//传递touch事件
- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
    if(!self.dragging)
        
    {
        [[self nextResponder]touchesBegan:touches withEvent:event];
    }
    
    [super touchesBegan:touches withEvent:event];
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    if(!self.dragging)
    {
        [[self nextResponder]touchesMoved:touches withEvent:event];
    }
    [super touchesMoved:touches withEvent:event];
}



- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
{
    if(!self.dragging)
    {
        [[self nextResponder]touchesEnded:touches withEvent:event];
    }
    [super touchesEnded:touches withEvent:event];
}
bubuko.com,布布扣

 

UIScollView Touch事件,布布扣,bubuko.com

UIScollView Touch事件

原文:http://www.cnblogs.com/joesen/p/3751257.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!