fix: add missing shadow for compose publish button

This commit is contained in:
CMK 2022-02-10 14:22:14 +08:00
parent 471384d5f3
commit 1ac0bd65be
1 changed files with 10 additions and 1 deletions

View File

@ -53,7 +53,16 @@ final class ComposeViewController: UIViewController, NeedsDependency {
}() }()
private(set) lazy var publishBarButtonItem: UIBarButtonItem = { private(set) lazy var publishBarButtonItem: UIBarButtonItem = {
configurePublishButtonApperance() configurePublishButtonApperance()
let barButtonItem = UIBarButtonItem(customView: publishButton) let shadowBackgroundContainer = ShadowBackgroundContainer()
publishButton.translatesAutoresizingMaskIntoConstraints = false
shadowBackgroundContainer.addSubview(publishButton)
NSLayoutConstraint.activate([
publishButton.topAnchor.constraint(equalTo: shadowBackgroundContainer.topAnchor),
publishButton.leadingAnchor.constraint(equalTo: shadowBackgroundContainer.leadingAnchor),
publishButton.trailingAnchor.constraint(equalTo: shadowBackgroundContainer.trailingAnchor),
publishButton.bottomAnchor.constraint(equalTo: shadowBackgroundContainer.bottomAnchor),
])
let barButtonItem = UIBarButtonItem(customView: shadowBackgroundContainer)
return barButtonItem return barButtonItem
}() }()