fix share screen nav bar UI for iOS 15

pull/513/head
ryanzhao 4 years ago
parent 7aa751ca45
commit 6b81d78d43

@ -36,6 +36,7 @@ final class ThreadPickerVC : UIViewController, UITableViewDataSource, UITableVie
// MARK: Lifecycle // MARK: Lifecycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
setupNavBar()
// Gradient // Gradient
view.backgroundColor = .clear view.backgroundColor = .clear
let gradient = Gradients.defaultBackground let gradient = Gradients.defaultBackground
@ -68,6 +69,18 @@ final class ThreadPickerVC : UIViewController, UITableViewDataSource, UITableVie
reload() reload()
} }
private func setupNavBar() {
guard let navigationBar = navigationController?.navigationBar else { return }
if #available(iOS 15.0, *) {
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = Colors.navigationBarBackground
appearance.shadowColor = .clear
navigationBar.standardAppearance = appearance;
navigationBar.scrollEdgeAppearance = navigationBar.standardAppearance
}
}
// MARK: Table View Data Source // MARK: Table View Data Source
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return Int(threadCount) return Int(threadCount)

Loading…
Cancel
Save