[btn addTarget:self action:@selector(touchUpInSide:forEvent:) forControlEvents:UIControlEventTouchUpInside];
}
- (IBAction)touchUpInSide:(id)sender forEvent:(UIEvent *)event {
NSSet *touchs = [event allTouches];
UITouch *touch = [touchs anyObject];
// NSLog(@"%d",[touch tapCount]);
if ([touch tapCount] == 1) {
[self performSelector:@selector(singleTapLesson:) withObject:sender afterDelay:0.3];
}
else if([touch tapCount] == 2)
{
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(singleTapLesson:) object:sender];
[self doubleTapLesson:sender];
}
}
#pragma mark 单 击 子 视图 ,子 视频
- (void)singleTapLesson:(id)sender
{
NSLog(@"singleTapLesson");
}
-(void)doubleTapLesson:(id)sender
{
NSLog(@"doubleTapLesson");
}