Closed TaezIT closed 3 months ago
Hello @TaezIT ,
Preventing screen capture in an iOS app presents challenges due to the lack of direct support from the iOS operating system. In our library, we've customized our code with various hacks and workarounds to achieve the desired result. Users may encounter occasional issues with a disrupted UI. To address this, consider the following approaches for different frameworks:
To address the layout issue, consider: For UIKit: To prevent the layout issue by incorporating "ScreenShield" protection to your view after the UI finishes loading. Implementing this protection in the viewDidAppear method can effectively mitigate layout problems.
Check Readme Note for details: https://github.com/JayantBadlani/ScreenShield/blob/main/README.md
I wrote this in viewDidAppear and DispatchQueue but my layout still break I write this with another view different superview -> it will active normal
I use ScreenShield.swift file in my project. But when I call ScreenShield.shared.protect(view: self.view) with view is superview of viewcontroller, my layout will be break. I tried to fix it but I think the problem is here layer.superlayer?.addSublayer(textField) textField.layer.sublayers?.last?.addSublayer(layer)
How can I fix it