Kurdtvs-Live-Kurdish-TV-Kur.../Mastodon/Extension/UITapGestureRecognizer.swift

27 lines
723 B
Swift
Raw Normal View History

2021-02-20 06:55:06 +01:00
//
// UITapGestureRecognizer.swift
// Mastodon
//
// Created by sxiaojian on 2021/2/19.
//
import UIKit
extension UITapGestureRecognizer {
static var singleTapGestureRecognizer: UITapGestureRecognizer {
let tapGestureRecognizer = UITapGestureRecognizer()
tapGestureRecognizer.numberOfTapsRequired = 1
tapGestureRecognizer.numberOfTouchesRequired = 1
return tapGestureRecognizer
}
static var doubleTapGestureRecognizer: UITapGestureRecognizer {
let tapGestureRecognizer = UITapGestureRecognizer()
tapGestureRecognizer.numberOfTapsRequired = 2
tapGestureRecognizer.numberOfTouchesRequired = 1
return tapGestureRecognizer
}
}