[go: up one dir, main page]

iOS 26: FloatingBarContainerView overlapping the whole custom ViewController

Hi everyone:

I'm experiencing an issue in iOS 26. I've implemented a custom ViewController. It's super simple to edit images with flip, crop, zoom in, and zoom out. My question is that it seems very strange to me. It works without problems in iOS 17.5 and iOS 18. However, when I try to run it with iOS 26, the entire ViewController seems disabled; it doesn't recognize touches or anything. When I checked the UI hierarchy, I saw a strange FloatingBarContainerView overlaying the entire ViewController.

I searched the documentation for information about this view, but I couldn't find anything. Any help on how to hide or remove this view in iOS 26? This hasn't been implemented anywhere.

Answered by DennisMostajo in 861407022

Thank you very much for your answer!. Well, the custom view controller was using the standard storyboard with UIKit, and I was adding my custom CropView programmatically. Now debugging in detail between iOS 17.5, iOS 18, and iOS 26, it seems that in iOS 26, it always shows that FloatingBarContainerView (maybe it's something related to liquid glass by default), so by code I added:

let cropViewAsView = cropView as! UIView
                cropViewAsView.translatesAutoresizingMaskIntoConstraints = false
                NSLayoutConstraint.activate([
                    cropViewAsView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
                    cropViewAsView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
                    cropViewAsView.topAnchor.constraint(equalTo: view.topAnchor),
                    cropViewAsView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
                ])

And this fixed my issue, as you commented, related to the storyboard. I forgot to add the constraints layouts, and it seems that my custom crop view was starting with frame CGRect zero by default in iOS 26

Thank you for your post and for providing a detailed description of the issue. If I understand correctly, the UI was created using Storyboards? I always recommend starting with a simple, out-of-the-box UI in iOS 26 and then customizing it.

Could you please provide a method to isolate the functionality of the FloatingBarContainerView into a single, focused, and simple project? So we can download and take a look?

Do you get the same results with just the relevant code in a small test project? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

Albert Pascual
  Worldwide Developer Relations.

Accepted Answer

Thank you very much for your answer!. Well, the custom view controller was using the standard storyboard with UIKit, and I was adding my custom CropView programmatically. Now debugging in detail between iOS 17.5, iOS 18, and iOS 26, it seems that in iOS 26, it always shows that FloatingBarContainerView (maybe it's something related to liquid glass by default), so by code I added:

let cropViewAsView = cropView as! UIView
                cropViewAsView.translatesAutoresizingMaskIntoConstraints = false
                NSLayoutConstraint.activate([
                    cropViewAsView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
                    cropViewAsView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
                    cropViewAsView.topAnchor.constraint(equalTo: view.topAnchor),
                    cropViewAsView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
                ])

And this fixed my issue, as you commented, related to the storyboard. I forgot to add the constraints layouts, and it seems that my custom crop view was starting with frame CGRect zero by default in iOS 26

iOS 26: FloatingBarContainerView overlapping the whole custom ViewController
 
 
Q