iPad Sidebar Backgrounds in iOS 26
UIBackgroundExtensionView for iPad Sidebar Backgrounds
WWDC 25: Build a UIKit app with the new design (see timestamp) shows how to use UIBackgroundExtensionView
to extend iPad background images under the new Liquid Glass sidebars. The image is reflected and extended under the sidebar for a neat visual effect:
You’ll notice how the mountain line seen under the translucent sidebar is a reflection of the visible mountain line.
Here’s some sample code:
class PrimaryViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .clear
// Create your background content
let posterImageView = UIImageView(image: .yosmite)
posterImageView.contentMode = .scaleAspectFill
// Wrap it in UIBackgroundExtensionView
let extView = UIBackgroundExtensionView()
extView.contentView = posterImageView
// Add and constrain to fill the view
view.addSubview(extView)
extView.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
extView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
extView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
extView.topAnchor.constraint(equalTo: view.topAnchor),
extView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
])
}
}