@Palace Software
I explored this quite extensively before committing to a solution, as stated above using 'UIModalPresentationStyle.overFullScreen' and 'UIModalTransitionStyle.crossDissolve' will allow the background to stay transparent however the user loses the ability to 'swipe to dismiss' as is expected for a modal view.
An alternate that works is to set 'UIModalPresentationStyle.custom' and then write your own transition. I tried this and wrote a transition that attempts to mimic the default iOS Behaviour Modal Behaviour. Swipe to dismiss works and it feels okay but the tricky thing is implementing the partial swipe logic, where a user may swipe it down 50% and the popover moves down with the users touch but doesn't fully dismiss until the user swipes down further. I couldn't get this working and ended up giving up.
The approach I took in the end was to embrace the new look and access the already present UISheetPresentationController and use detents. The process of implementing it is tricky as I want to retain the same functionality I have now for people using iOS 18 and prior and only implement this new look for iOS 26 and later. I ended up writing a bunch of helper functions similar to the below:
static func preparePopoverForPresentation(vc: UIViewController, customDetents: [CGFloat] = [], mediumDetents: Bool = true, largeDetents: Bool = true) {
if #available(iOS 26.0, *) {
if let sheet = vc.sheetPresentationController {
// Create Detents
var detents: [UISheetPresentationController.Detent] = []
for value in customDetents {
let detentValue = getDetent(basedOn: value)
detents.append(.custom(resolver: { context in detentValue }))
}
if mediumDetents { detents.append(.medium()) }
if largeDetents { detents.append(.large()) }
// Assign Sheet Values
sheet.detents = detents
if detents.count > 1 { sheet.prefersGrabberVisible = true }
sheet.prefersScrollingExpandsWhenScrolledToEdge = true
}
} else {
// Pre iOS 26 Implementation
vc.modalPresentationStyle = UIModalPresentationStyle.popover
vc.modalTransitionStyle = UIModalTransitionStyle.coverVertical
}
}
All up the work to move my UIKit App to support iOS 26 was around 7-8 Full Days, with a few outstanding issues I'm yet to fully resolve pending future beta builds.
My SwiftUI Apps make the transition a bunch easier but this project is built in UIKit and there is a lot of extra work required for the older UI Frameworks.
It's frustrating to have to spend that long updating things just so my app doesn't look horrible for exisiting users. I'm sure they would have preferred I spent that time building new functionality that is actually useful for them rather than spending 70-80 Hours on what is essentially a compatibility update.
If I could have simply set 'have transparent background' myself I would have easily saved a bunch of time as most of the work was adapting 20+ VCs that used a transparent background with a smaller popover.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: