ScreenshotSecurity - it's just a view that can help you hide private conent during screenshot or screen record
final class CredicCardViewController: UIViewController {
...
let screenshotSecureView = ScreenshotSecureView()
let creditCardNumber = UITextField()
let blurView = BlurView()
...
private func setupScreenshotSecureView() {
screenshotSecureView.viewToProtect = creditCardNumber
/// > NOTE: `viewToShow` is optional, so you free to not use it - anyway, during screenshot or screen record `viewToProtect` will be hidden
screenshotSecureView.viewToShow = blurView
}
...
}struct CredicCardView: View {
...
var body: some View {
CreditCardField()
.screenshotSecure(viewToShow: BlurView())
}
}- Swift 5.0
- iOS 15.0
dependencies: [
.package(
url: "https://gitlab.com/Madara2hor/ScreenshotSecurity",
.upToNextMajor(from: "1.0.0")
)
]ScreenshotSecurity is distributed under the MIT License.