Manual Hide for SwiftUI
Note: Ensure your deployment target is iOS 13.0 or later.
You can manually hide specific views from being recorded using Wingify Manual Hide.
Steps:
- Wrap your content inside the WingifyHideContainer.
- Mark the views you want to hide using either of the following methods:
-
Apply the .WingifyhideView() modifier directly on the SwiftUI view.
OR
-
Call the method Wingify.hideView(view: view) programmatically.
Example Implementation
import SwiftUI
@available(iOS 13.0, *)
struct ExampleScreen: View {
@State private var hideText = false
var body: some View {
WingifyHideContainer {
VStack {
if !hideText {
Text("This can be hidden")
.WingifyhideView()
}
Button("Toggle Hide") {
hideText.toggle()
}
}
}
}
}This setup ensures that any view marked with .WingifyhideView() will be hidden during session recording, providing enhanced privacy and control over sensitive UI elements.