Use SF Symbol icon for add attachment button

This commit is contained in:
Shadowfacts 2019-06-13 13:13:53 -07:00
parent 1997aaf915
commit fccdd0a9bd
Signed by untrusted user: shadowfacts
GPG Key ID: 83FB3304046BADA4
2 changed files with 14 additions and 2 deletions

View File

@ -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 []

View File

@ -136,7 +136,7 @@
<constraint firstAttribute="height" constant="80" id="sGZ-uD-CtS"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<state key="normal" title=" Add image or video" image="More">
<state key="normal" title=" Add image or video" image="photo" catalog="system">
<color key="titleColor" cocoaTouchSystemColor="systemBlueColor"/>
</state>
<connections>
@ -198,6 +198,6 @@
</view>
</objects>
<resources>
<image name="More" width="60" height="30"/>
<image name="photo" catalog="system" width="64" height="48"/>
</resources>
</document>