mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Authorization code paste menu
This commit is contained in:
@@ -118,6 +118,7 @@ public final class CodeInputView: ASDisplayNode, UITextFieldDelegate {
|
||||
private var itemViews: [ItemView] = []
|
||||
|
||||
public var updated: (() -> Void)?
|
||||
public var longPressed: (() -> Void)?
|
||||
|
||||
private var theme: Theme?
|
||||
private var count: Int?
|
||||
@@ -169,6 +170,18 @@ public final class CodeInputView: ASDisplayNode, UITextFieldDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
public override func didLoad() {
|
||||
super.didLoad()
|
||||
|
||||
self.view.addGestureRecognizer(UILongPressGestureRecognizer(target: self, action: #selector(self.handleLongPress(_:))))
|
||||
}
|
||||
|
||||
@objc func handleLongPress(_ gestureRecognizer: UILongPressGestureRecognizer) {
|
||||
if case .ended = gestureRecognizer.state {
|
||||
self.longPressed?()
|
||||
}
|
||||
}
|
||||
|
||||
private var isSucceed = false
|
||||
private var isFailed = false
|
||||
private var isResetting = false
|
||||
|
||||
Reference in New Issue
Block a user