From fccdd0a9bdbbca433a782fe7d3b91eddd20965e5 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 13 Jun 2019 13:13:53 -0700 Subject: [PATCH] Use SF Symbol icon for add attachment button --- Tusker/Screens/Compose/ComposeViewController.swift | 12 ++++++++++++ Tusker/Screens/Compose/ComposeViewController.xib | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Compose/ComposeViewController.swift b/Tusker/Screens/Compose/ComposeViewController.swift index bc75ff54..96b645ec 100644 --- a/Tusker/Screens/Compose/ComposeViewController.swift +++ b/Tusker/Screens/Compose/ComposeViewController.swift @@ -187,6 +187,18 @@ class ComposeViewController: UIViewController { // } } + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + let imageName: String + if traitCollection.userInterfaceStyle == .dark { + imageName = "photo.fill" + } else { + imageName = "photo" + } + addAttachmentButton.setImage(UIImage(systemName: imageName), for: .normal) + } + func createFormattingButtons() -> [UIBarButtonItem] { guard Preferences.shared.statusContentType != .plain else { return [] diff --git a/Tusker/Screens/Compose/ComposeViewController.xib b/Tusker/Screens/Compose/ComposeViewController.xib index 02fa6cf1..9ed1e78e 100644 --- a/Tusker/Screens/Compose/ComposeViewController.xib +++ b/Tusker/Screens/Compose/ComposeViewController.xib @@ -136,7 +136,7 @@ - + @@ -198,6 +198,6 @@ - +