UITableView 在didSelectRowAtIndexPath 实现双击事件的方法

来源:互联网 发布:免费开淘宝网店流程 编辑:程序博客网 时间:2024/05/22 13:34

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

{  

//如果两次点击的时间间隔小于1秒,则断定为双击事件

NSUInteger curr = [[NSDatedate] timeIntervalSince1970];

if (curr-taptime<1) {

[selfdoubleTap];

}

taptime = curr;

}

原创粉丝点击