Post

Replies

Boosts

Views

Created

Weird transparency in sidebar in iPad app
I have an iPad app with a classic sidebar. It's been working fine for years. Now with iPadOS 26 the sidebar sometime gets this fake transparency that makes it really hard to quickly grok. A part of Liquid Glass seems to be to sometimes (but not always) take whatever is in the secondary area (the main big content), blur it, mirror it and then use as the background for the sidebar. This is silly and does not work at all for an app like mine. It maybe looks decent if your background is a photo or similar, but not for an app that manages data. Not all views cause the sidebar to get this ugly unreadable background. In most of the cases the sidebar keeps its normal opaque background that it has always had. See this example for how it looks when it's really bad: This is how it should look. Notice that the content of the "main view" is pretty similar to the case where it gets the ugly background. The difference is the segmented thing at the top, ie. a different "root view". Is there some good way for me to force the sidebar to always have an opaque background? I guess I could make a ZStack and put a solid color as the background behind the sidebar, but those kinds of hacks are better to avoid. This can not be how some UI designer envisioned that apps should look? Maybe I'm missing some new modifier or setting somewhere that would led me opt out from this aspect of Liquid Glass? Apart from this it looks pretty nice. There are some bugs where the contents of the main area gets clipped when the sidebar is shown, hidden and then shown again, but that's for another time (and it's surely known already (if the bug tracking system allowed me to search I could verify)). So, any way to make my app look nice again?
4
0
158
Oct ’25
Programmatically capture a 1x photo with depth data
So I want to programmatically take a series of photos that include depth data. This should be done using the back 1x camera. My code for setting up the capturing is basically the snippet below. I've removed error handling etc for simplicity. let captureDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .unspecified) else { let input = try AVCaptureDeviceInput(device: captureDevice) captureSession.beginConfiguration() captureSession.addInput(input) captureSession.addOutput(photoOutput) photoOutput.isDepthDataDeliveryEnabled = true photoOutput.isHighResolutionCaptureEnabled = true photoOutput.isDepthDataDeliveryEnabled = true photoOutput.maxPhotoQualityPrioritization = .quality captureSession.sessionPreset = .photo captureSession.commitConfiguration() captureSession.startRunning() Whatever I do I can't get the camera initialized, as soon as isDepthDataDeliveryEnabled is set to true the app throws an exception: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCapturePhotoOutput setDepthDataDeliveryEnabled:] Depth data delivery is not supported in the current configuration' The only device that can even be initialized is builtInDualCamera, but it produces horrible zoomed in photos that are blurry and awful. I can apparently not tell the camera to not zoom in nor to focus? This API is probably the most awful of all API:s I've used in the Apple world. The best documentation I can find are the notes for a sample app: https://developer.apple.com/documentation/avfoundation/additional_data_capture/capturing_photos_with_depth In that sample the same camera is used as I try to use: // Select a depth-capable capture device. guard let videoDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .unspecified) else { fatalError("No dual camera.") } Am I to understand from this that an iPhone 12 Pro can not capture depth? There's a distinct lack of material related to handling depth on the Internet, so probably not many have done it at all. I even tried the sample Lidar app from https://developer.apple.com/documentation/avfoundation/additional_data_capture/capturing_depth_using_the_lidar_camera, but it has bit rot a bit and also fails with various errors as soon as the UI is touched.
0
0
925
Jan ’23