Added support for the change isTranslucent NavigationBar

This commit is contained in:
mrustaa
2023-12-24 00:43:06 +03:00
parent 8bff1e5c24
commit 831b2f144f
3 changed files with 57 additions and 6 deletions
@@ -31,9 +31,22 @@ class ExampleAddCollectionViewController: StoryboardController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.navigationBar.isTranslucent = true
container.move(type: .middle)
}
@IBAction func buttonChangeTranslucent(_ sender: UIButton) {
guard let translucent = navigationController?.navigationBar.isTranslucent else { return }
navigationController?.navigationBar.isTranslucent = !translucent
container.move(type: container.moveType)
}
func addCollectionView() -> UICollectionView {
let layout = UICollectionViewFlowLayout()