美文网首页
TableView不响应touches 解决办法

TableView不响应touches 解决办法

作者: 牛1688 | 来源:发表于2017-02-14 14:38 被阅读0次

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

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__);

}

相关文章

网友评论

      本文标题:TableView不响应touches 解决办法

      本文链接:https://www.haomeiwen.com/subject/zrbxwttx.html