This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
@State var urlString = "https://www.google.com" | |
@State var url: URL? | |
var body: some View { | |
NavigationStack { | |
WebViewReader { proxy in | |
Webview(url: url ?? URL(string: "https://www.google.com")!) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class UIKitTextField: UITextField {} | |
final class Box<T> { | |
var value: T | |
init(_ value: T) { | |
self.value = value | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
typealias CustomTextFieldStyle = ViewModifier | |
extension View { | |
func customTextFieldStyle<S>(_ style: S) -> some View where S: CustomTextFieldStyle { | |
modifier(style) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
enum Sheet: String, Identifiable { | |
var id: String { | |
rawValue | |
} |