March 2, 2024

SwiftUI Useful Modifiers

.resizeable() – Modifier that makes the view resizable. e.g. .edgesIgnoringSafeArea(.all) – Modifier that causes the view to cross the safe area boundaries. Safe area options: @State – This tells SwiftUI …

Implement a WebView in SwiftUI

To use any UIKit component in SwiftUI, it needs to be wrapped with UIViewRepresentable. Create the wrapper struct: 2. UIViewRepresentable requires the ‘makeUIView’ and ‘updateUIView functions to be implemented: 3. …