IOS UIScrollView中 使用 touch 无法响应的问题
2015-06-16 10:38
555 查看
添加一个 Category 然后在使用到 UIScrollView 的文件里面 导入这个头文件 就可以
//
// UIScrollView+UITouch.m
// alarm
//
// Created by zhuang chaoxiao on 15-6-16.
// Copyright (c) 2015年 zhuang chaoxiao. All rights reserved.
//
#import "UIScrollView+UITouch.h"
@implementation UIScrollView (UITouch)
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[[self nextResponder] touchesBegan:touches withEvent:event];
//[super touchesBegan:touches withEvent:event];
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[[self nextResponder] touchesMoved:touches withEvent:event];
//[super touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[[self nextResponder] touchesEnded:touches withEvent:event];
//[super touchesEnded:touches withEvent:event];
}
@end
//
// UIScrollView+UITouch.m
// alarm
//
// Created by zhuang chaoxiao on 15-6-16.
// Copyright (c) 2015年 zhuang chaoxiao. All rights reserved.
//
#import "UIScrollView+UITouch.h"
@implementation UIScrollView (UITouch)
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[[self nextResponder] touchesBegan:touches withEvent:event];
//[super touchesBegan:touches withEvent:event];
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[[self nextResponder] touchesMoved:touches withEvent:event];
//[super touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[[self nextResponder] touchesEnded:touches withEvent:event];
//[super touchesEnded:touches withEvent:event];
}
@end
相关文章推荐
- IOS Key-Value Observing (KVO)
- IOS Key-Value Observing (KVO)
- 【Android UI设计与开发】第09期:底部菜单栏(四)Fragment+PopupWindow仿QQ空间最新版底部菜单栏
- 【uiautomator】UiDevice
- Android stuido debug调试
- VS2008工程移植到2010的问题'system.io.fileloadexception was unhandled message=mixed mode assembly is built ag
- 【Android UI设计与开发】第08期:底部菜单栏(三)Fragment+FragmentTabHost实现仿新浪微博底部菜单栏
- LeetCode OJ 之 Implement Stack using Queues(使用队列实现栈)
- easy ui 隐藏tabs项
- Ext.Ajax.request 用法参数介绍
- fluent validation
- VSTO之旅系列(三):自定义Excel UI
- FeatureClass.Search(IQuery Filter,bool Recycling)参数说明
- 深度学习笔记5:Building Deep Networks for Classification
- Leetcode[225]-Implement Stack using Queues
- UVA 1605 - Building for UN
- Handler,Looper,Message,MessageQueue之间关系浅析
- LeetCode "Implement Stack using Queues"
- Global build settings
- Global build settings