SwiftUI-材质组件、文本字段
我想在我的SwiftUI应用程序中使用mdc组件。 我用protocolSwiftUI-材质组件、文本字段,swiftui,mdc-components,uiviewrepresentable,swiftui-form,Swiftui,Mdc Components,Uiviewrepresentable,Swiftui Form,我想在我的SwiftUI应用程序中使用mdc组件。 我用protocolUIViewRepresentable创建了一个类,但我想将高度修改为某个常量,或者删除内部填充 func makeUIView(context: Context) -> MDCOutlinedTextField { let textField = MDCOutlinedTextField() textField.setOutlineColor(MyColor.greyLightUI, for
UIViewRepresentable
创建了一个类,但我想将高度修改为某个常量,或者删除内部填充
func makeUIView(context: Context) -> MDCOutlinedTextField {
let textField = MDCOutlinedTextField()
textField.setOutlineColor(MyColor.greyLightUI, for: .normal)
textField.setOutlineColor(MyColor.greyLightUI, for: .editing)
textField.setFloatingLabelColor(MyColor.greyUI, for: .normal)
textField.setFloatingLabelColor(MyColor.greyUI, for: .editing)
textField.setNormalLabelColor(MyColor.greyUI, for: .normal)
textField.setNormalLabelColor(MyColor.greyUI, for: .editing)
textField.font = UIFont(name: "Montserrat-Normal", size: 14)
textField.setTextColor(MyColor.darkUI, for: .normal)
textField.setTextColor(MyColor.darkUI, for: .editing)
textField.keyboardType = self.keyboardType
return textField
}