Answer the question
In order to leave comments, you need to log in
How to remove lags in a ScrollView that scrolls under a transparent navBar?
I get to this controller from the navigationController, which has a tab bar. When switching, I hide the tabBar, and make the navigation bar transparent so that the photo is right under the "back" to the main button. To do this, in viewWillAppear I do the following:
override func viewWillAppear(_ animated: Bool) {
navigationController?.navigationBar.tintColor = .white
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.isTranslucent = true
self.tabBarController?.tabBar.isHidden = true
}
Answer the question
In order to leave comments, you need to log in
Well, you probably don't need to hook it to SafeArea , but hook it directly to SuperView . Then you don't need to write -44, it will just be 0.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question