TableView不响应touches 解决办法

2017-02-14  本文已影响0人  牛1688

分类方法主要是不改变原代码的基础出上,添加新的方法.

1 如果分类中如果重写了该类的对象方法,系统会先调用分类重写的对象方法.

2 然后在分类中调用一下super touches 即可.

//UITableView+LJFTouch.m

#import"UITableView+LJFTouch.h"

@implementationUITableView (LJFTouch)

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent*)event{

[supertouchesBegan:toucheswithEvent:event];

NSLog(@"tableView分类方法%s",__func__);

}

上一篇 下一篇

猜你喜欢

热点阅读