Use SF Symbol icon for add attachment button
This commit is contained in:
parent
1997aaf915
commit
fccdd0a9bd
|
@ -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 []
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue