1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-08 06:42:04 +01:00
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
}
}