码迷,mamicode.com
首页 > 其他好文 > 详细

UIScollView Touch事件

时间:2014-05-25 22:02:28      阅读:318      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   c   code   java   

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事件

标签:style   class   blog   c   code   java   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!