Page curl transition: how do I darken the underside of the curling page in dark mode?
I've got a daily-reader app that uses a page-curl transition between articles, and it works great in light mode. The problem is dark mode: when a page curls, the underside / opposite face of the curling leaf still renders bright, so you get this glaring light triangle peeling across an otherwise dark screen. The front faces respect dark mode fine — it's specifically the back of the curl that doesn't.
Setup: SwiftUI app, the curl itself is [UIPageViewController with .pageCurl transitionStyle, bridged via UIViewControllerRepresentable / your actual setup]. Each page is a SwiftUI view hosted in a UIHostingController.
What I've tried so far:
- [e.g. setting the hosting controller's
view.backgroundColorto a dark color] - [e.g. forcing
.overrideUserInterfaceStyle = .dark] - [e.g. setting
isDoubleSided/ tinting the page view controller's view]
…but the curl's reverse face still comes out light. Short clip of the effect attached.
Is the underside something UIKit renders from the page's own backing, or is there a separate layer/material I can get at to tint it? Is .pageCurl even the right tool here, or do people drop down to a custom Metal/shader curl to get full control over both faces in dark mode? Open to either answer.