forked from shadowfacts/Tusker
Add background to gallery close/share buttons
This commit is contained in:
parent
509ed305cd
commit
fe00015248
|
@ -90,7 +90,9 @@ class GalleryItemViewController: UIViewController {
|
||||||
topControlsView.translatesAutoresizingMaskIntoConstraints = false
|
topControlsView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(topControlsView)
|
view.addSubview(topControlsView)
|
||||||
|
|
||||||
var shareConfig = UIButton.Configuration.plain()
|
var shareConfig = UIButton.Configuration.gray()
|
||||||
|
shareConfig.cornerStyle = .capsule
|
||||||
|
shareConfig.background.backgroundColor = .black.withAlphaComponent(0.25)
|
||||||
shareConfig.baseForegroundColor = .white
|
shareConfig.baseForegroundColor = .white
|
||||||
shareConfig.image = UIImage(systemName: "square.and.arrow.up")
|
shareConfig.image = UIImage(systemName: "square.and.arrow.up")
|
||||||
shareButton = UIButton(configuration: shareConfig)
|
shareButton = UIButton(configuration: shareConfig)
|
||||||
|
@ -99,7 +101,9 @@ class GalleryItemViewController: UIViewController {
|
||||||
updateShareButton()
|
updateShareButton()
|
||||||
topControlsView.addSubview(shareButton)
|
topControlsView.addSubview(shareButton)
|
||||||
|
|
||||||
var closeConfig = UIButton.Configuration.plain()
|
var closeConfig = UIButton.Configuration.gray()
|
||||||
|
closeConfig.cornerStyle = .capsule
|
||||||
|
closeConfig.background.backgroundColor = .black.withAlphaComponent(0.25)
|
||||||
closeConfig.baseForegroundColor = .white
|
closeConfig.baseForegroundColor = .white
|
||||||
closeConfig.image = UIImage(systemName: "xmark")
|
closeConfig.image = UIImage(systemName: "xmark")
|
||||||
let closeButton = UIButton(configuration: closeConfig)
|
let closeButton = UIButton(configuration: closeConfig)
|
||||||
|
|
Loading…
Reference in New Issue