Ios swift – A SwiftUI View with one initializer for iOS and macOS
I have the following SwiftUI view in my project that supports macOS 13+ and iOS 16+: struct MyTextField: View { var placeholder: LocalizedStringKey #if os (iOS) var keyboardType: UIKeyboardType = .default #endif } at call site I can't use a…