forked from shadowfacts/Tusker
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] {
|
func createFormattingButtons() -> [UIBarButtonItem] {
|
||||||
guard Preferences.shared.statusContentType != .plain else {
|
guard Preferences.shared.statusContentType != .plain else {
|
||||||
return []
|
return []
|
||||||
|
|
|
@ -136,7 +136,7 @@
|
||||||
<constraint firstAttribute="height" constant="80" id="sGZ-uD-CtS"/>
|
<constraint firstAttribute="height" constant="80" id="sGZ-uD-CtS"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="18"/>
|
<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"/>
|
<color key="titleColor" cocoaTouchSystemColor="systemBlueColor"/>
|
||||||
</state>
|
</state>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -198,6 +198,6 @@
|
||||||
</view>
|
</view>
|
||||||
</objects>
|
</objects>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="More" width="60" height="30"/>
|
<image name="photo" catalog="system" width="64" height="48"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
|
Loading…
Reference in New Issue