Using a storyboard, I created a UIView containing an UIImageView and a UILabel, that I dragged into the navigation bar of one of my viewControllers. In my viewDidLoad I transform the view to move it down past the bounds of the navigation bar so its hidden initially
navBarMiddleView.transform = .init(translationX: 0, y: 50)
Then as the screen scrolls, I slowly move it up so it slides back into the middle of the navigationBar
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let padding: CGFloat = 70
let adjustedOffset = (scrollView.contentOffset.y - padding)
navBarMiddleView.transform = .init(translationX: 0, y: max(0, (50 - adjustedOffset)))
}
(The content is displayed in a collectionView cell as large content initially, and I want it to remain visible as the user scrolls down. So a mini view of the same data is moved up into the navigationBar)
With iOS 26 the navigationBar is applying a blur effect to this view, even when its outside the bounds of the navigationBar, meaning the content its hovering on top of is slightly obscured. I don't know why this blur is being added, how do I remove it?
I've tried the following based on recommendations from chatGPT but none have worked
self.navigationController?.navigationBar.clipsToBounds = true
self.navBarMiddleView.layer.allowsGroupOpacity = false
self.navBarMiddleView.backgroundColor = .clear
self.navBarMiddleView.isOpaque = true
self.navBarMiddleView.layer.isOpaque = true
I have my navigation bar setup with this appearence already:
let navigationBarAppearance = UINavigationBarAppearance()
navigationBarAppearance.configureWithOpaqueBackground()
navigationBarAppearance.backgroundEffect = nil
navigationBarAppearance.backgroundColor = UIColor.clear
navigationBarAppearance.shadowColor = .clear
navigationBarAppearance.titleTextAttributes = [
NSAttributedString.Key.foregroundColor: UIColor.colorNamed("Txt2"),
NSAttributedString.Key.font: UIFont.custom(ofType: .bold, andSize: 20)
]
UINavigationBar.appearance().standardAppearance = navigationBarAppearance
UINavigationBar.appearance().compactAppearance = navigationBarAppearance
UINavigationBar.appearance().scrollEdgeAppearance = navigationBarAppearance