Fix header banner display issues

This commit is contained in:
relikd
2020-09-08 18:16:21 +02:00
parent 5d94fe3a0d
commit 6d78aeac7b
2 changed files with 5 additions and 3 deletions

View File

@@ -30,14 +30,16 @@ struct NotificationBanner {
img.tintColor = fg
view.addSubview(lbl)
view.addSubview(img)
img.anchor([.centerY], to: view.layoutMarginsGuide)
lbl.anchor([.top, .bottom, .trailing], to: view.layoutMarginsGuide)
img.anchor([.centerY], to: lbl)
lbl.anchor([.bottom, .trailing], to: view.layoutMarginsGuide)
img.widthAnchor =&= 25
img.heightAnchor =&= 25
if #available(iOS 11, *) {
img.leadingAnchor =&= view.layoutMarginsGuide.leadingAnchor
lbl.topAnchor =&= view.layoutMarginsGuide.topAnchor
} else {
img.leadingAnchor =&= view.leadingAnchor + 8
lbl.topAnchor =&= view.topAnchor + 8
}
lbl.leadingAnchor =&= img.trailingAnchor + 8
img.bottomAnchor =<= view.bottomAnchor - 8 | .init(rawValue: 999)

View File

@@ -235,7 +235,7 @@ class TVCShareRecording : UITableViewController, UITextViewDelegate, VCEditTextD
// MARK: - Alerts & Banner
private func banner(_ style: NotificationBanner.Style, _ msg: String) {
NotificationBanner(msg, style: style).present(in: self)
NotificationBanner(msg, style: style).present(in: navigationController!)
}
private func showAlertAvailableSoon(_ urlStr: String, when: Int?) {