mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-10 15:47:02 +01:00
28 lines
794 B
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
|
||
|
}
|
||
|
|
||
|
}
|