Example fixes

This commit is contained in:
Jakub Kaspar
2024-07-11 11:25:37 +02:00
parent 75215ecfc8
commit bf73559135
5 changed files with 1 additions and 26 deletions
+1
View File
@@ -36,6 +36,7 @@ final internal class AppDelegate: UIResponder, UIApplicationDelegate {
]
: [masterViewController]
splitViewController.preferredDisplayMode = .allVisible
masterViewController.navigationItem.largeTitleDisplayMode = .never
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = splitViewController
@@ -52,7 +52,6 @@ class ChatViewController: MessagesViewController, MessagesDataSource {
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.largeTitleDisplayMode = .never
navigationItem.title = "MessageKit"
configureMessageCollectionView()
@@ -42,7 +42,6 @@ final internal class LaunchViewController: UITableViewController {
super.viewDidLoad()
title = "MessageKit"
navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
navigationController?.navigationBar.prefersLargeTitles = true
navigationController?.navigationBar.tintColor = .primaryColor
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
tableView.tableFooterView = UIView()
@@ -62,18 +62,6 @@ final class MessageContainerController: UIViewController {
view.addSubview(bannerView)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.navigationBar.isTranslucent = true
navigationController?.navigationBar.barTintColor = .clear
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.navigationBar.isTranslucent = false
navigationController?.navigationBar.barTintColor = .primaryColor
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
let headerHeight: CGFloat = 200
@@ -39,16 +39,4 @@ final class MessageSubviewContainerViewController: UIViewController {
view.addSubview(messageSubviewViewController.view)
messageSubviewViewController.didMove(toParent: self)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.navigationBar.isTranslucent = true
navigationController?.navigationBar.barTintColor = .clear
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.navigationBar.isTranslucent = false
navigationController?.navigationBar.barTintColor = .primaryColor
}
}