mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonUI/Extension/UITapGestureRecognizer.swift

28 lines
794 B
Swift

//
// UITapGestureRecognizer.swift
// TwidereX
//
// Created by Cirno MainasuK on 2020-11-5.
// Copyright © 2020 Twidere. All rights reserved.
//
import UIKit
extension UITapGestureRecognizer {
public static var singleTapGestureRecognizer: UITapGestureRecognizer {
let tapGestureRecognizer = UITapGestureRecognizer()
tapGestureRecognizer.numberOfTapsRequired = 1
tapGestureRecognizer.numberOfTouchesRequired = 1
return tapGestureRecognizer
}
public static var doubleTapGestureRecognizer: UITapGestureRecognizer {
let tapGestureRecognizer = UITapGestureRecognizer()
tapGestureRecognizer.numberOfTapsRequired = 2
tapGestureRecognizer.numberOfTouchesRequired = 1
return tapGestureRecognizer
}
}