aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/SharedViews/CopyableLabelTableViewCell.swift
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-12-14 17:12:59 -0600
committerEric Kuck <eric@bluelinelabs.com>2018-12-14 17:15:22 -0600
commit7a24f18eb753180800f9b44a767b0d59e4e702b7 (patch)
tree0e02b3ff59a672b0b25eb7bcc195e23730abec40 /WireGuard/WireGuard/UI/iOS/SharedViews/CopyableLabelTableViewCell.swift
parentPrettier log time format (diff)
downloadwireguard-apple-7a24f18eb753180800f9b44a767b0d59e4e702b7.tar.xz
wireguard-apple-7a24f18eb753180800f9b44a767b0d59e4e702b7.zip
Most similar views now shared between ViewControllers
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/iOS/SharedViews/CopyableLabelTableViewCell.swift (renamed from WireGuard/WireGuard/UI/iOS/CopyableLabelTableViewCell.swift)10
1 files changed, 5 insertions, 5 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/CopyableLabelTableViewCell.swift b/WireGuard/WireGuard/UI/iOS/SharedViews/CopyableLabelTableViewCell.swift
index daddf0a..93a9ef7 100644
--- a/WireGuard/WireGuard/UI/iOS/CopyableLabelTableViewCell.swift
+++ b/WireGuard/WireGuard/UI/iOS/SharedViews/CopyableLabelTableViewCell.swift
@@ -17,13 +17,13 @@ class CopyableLabelTableViewCell: UITableViewCell {
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
let gestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleTapGesture(_:)))
- self.addGestureRecognizer(gestureRecognizer)
- self.isUserInteractionEnabled = true
+ addGestureRecognizer(gestureRecognizer)
+ isUserInteractionEnabled = true
}
// MARK: - UIGestureRecognizer
@objc func handleTapGesture(_ recognizer: UIGestureRecognizer) {
- if !self.copyableGesture {
+ if !copyableGesture {
return
}
guard recognizer.state == .recognized else { return }
@@ -31,7 +31,7 @@ class CopyableLabelTableViewCell: UITableViewCell {
if let recognizerView = recognizer.view,
let recognizerSuperView = recognizerView.superview, recognizerView.becomeFirstResponder() {
let menuController = UIMenuController.shared
- menuController.setTargetRect(self.detailTextLabel?.frame ?? recognizerView.frame, in: self.detailTextLabel?.superview ?? recognizerSuperView)
+ menuController.setTargetRect(detailTextLabel?.frame ?? recognizerView.frame, in: detailTextLabel?.superview ?? recognizerSuperView)
menuController.setMenuVisible(true, animated: true)
}
}
@@ -50,6 +50,6 @@ class CopyableLabelTableViewCell: UITableViewCell {
override func prepareForReuse() {
super.prepareForReuse()
- self.copyableGesture = true
+ copyableGesture = true
}
}