Posts

Post marked as solved
1 Replies
806 Views
Regardless of how I set UIUserInterfaceStyle in info.plist, setting overrideUserInterfaceStyle on a UIViewController seems to do absolutely nothing (though the setting in info.plist doe override the system setting). Is overrideUserInterfaceStyle no longer supported? I'd like to provide a way for my users to override their system-wide dark or light mode in my app.
Posted
by mji83.
Last updated
.
Post not yet marked as solved
4 Replies
2.6k Views
I'm working on an app in which I create a CVPixelBuffer that I need to display as efficiently as possible. The fastest thing that seems work on a couple recent iPhones I've tested is to simply set the ViewController's layer.contents to the CVPixelBuffer. I was actually surprised this works as googling it would indicate that you can't just do this. However... upon testing this same piece of code on an old iPad Air 2, it didn't display anything. I did succeed in making it work on the iPad Air 2 by creating a CIImage from the CVPixelBuffer and then turning that into a CGImage and setting that to the layer's contents. I'm reluctant to use this in the application as it's considerably less efficient on the iPhone (I'm assuming that this entails some unnecessary extra uploads/downloads to the GPU). I'm trying to figure out which bit of code works on which hardware so I can fall back to the more CPU-intensive function for older hardware, but I'm not sure how to determine which hardware supports setting that CALayer contents to a CVPixelBuffer and which does not. Is there any documentation that would shed light on this? Thanks! Michael
Posted
by mji83.
Last updated
.