Relative Content

Tag Archive for iosswiftui

How to restore screen brightness when closing iOS app

One of the screens in my app shows a barcode. When a user navigates to the screen (it is a tab in my tabview) I set the screen brightness to the maximum. When a user navigates away from the screen I restore the screen brightness to what it was. The brightness isn’t restored when the user closes the app, either by moving it to the background or closing it completely. How can I restore the screen brightness when a user closes the app?

SwiftUI sheet size becomes 0 when changing theme (iOS 16 bug?)

I’m stuck with a weird SwiftUI bug. I have a sheet that’s supposed to size itself based on its content (using PreferenceKey + GeometryReader). Everything works fine until I try to change the user interface style using overrideUserInterfaceStyle.

How to get double tap gesture in ios15

I would like to add Douletap gesture in my image and finding tapped location using SpatialTapGeasture, but it’s allowing only ios 16+ versions.
So how to check below versions also to find tapped location.

How to get double tap gesture in ios15

I would like to add Douletap gesture in my image and finding tapped location using SpatialTapGeasture, but it’s allowing only ios 16+ versions.
So how to check below versions also to find tapped location.