From 8a513186aa959f52be073261c59c03a3749d571f Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 24 Mar 2020 23:02:40 -0400 Subject: [PATCH] Add pointer interactions status buttons and profile header more button --- Tusker/Screens/Compose/ComposeViewController.swift | 10 +++++++++- .../Profile Header/ProfileHeaderTableViewCell.swift | 13 +++++++++++++ .../Status/ConversationMainStatusTableViewCell.xib | 12 ++++++------ Tusker/Views/Status/TimelineStatusTableViewCell.xib | 12 ++++++------ 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Tusker/Screens/Compose/ComposeViewController.swift b/Tusker/Screens/Compose/ComposeViewController.swift index 8e89cc09..edd4fd15 100644 --- a/Tusker/Screens/Compose/ComposeViewController.swift +++ b/Tusker/Screens/Compose/ComposeViewController.swift @@ -233,7 +233,7 @@ class ComposeViewController: UIViewController { return [] } - return StatusFormat.allCases.map { (format) in + var formatButtons = StatusFormat.allCases.map { (format) -> UIBarButtonItem in let item: UIBarButtonItem if let image = format.image { item = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(formatButtonPressed(_:))) @@ -248,6 +248,14 @@ class ComposeViewController: UIViewController { item.accessibilityLabel = format.accessibilityLabel return item } + + for i in (1.. UIPointerStyle? { + let preview = UITargetedPreview(view: moreButtonVisualEffectView) + let rect = CGRect(x: moreButtonVisualEffectView.frame.minX - 4, y: moreButtonVisualEffectView.frame.minY - 4, width: moreButtonVisualEffectView.frame.width + 8, height: moreButtonVisualEffectView.frame.height + 8) + return UIPointerStyle(effect: .highlight(preview), shape: .roundedRect(rect, radius: 4)) + } +} diff --git a/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib b/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib index 657ab94b..f827687a 100644 --- a/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib +++ b/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib @@ -1,8 +1,8 @@ - + - + @@ -144,7 +144,7 @@ - - - - - - -