Renamed placeHolder to placeholder

This commit is contained in:
dankito 2020-08-03 20:42:11 +02:00
parent 98428959bb
commit 26717bf70b
1 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ struct UIKitTextField: UIViewRepresentable {
@Binding private var text: String @Binding private var text: String
private var placeHolder: String private var placeholder: String
private var keyboardType: UIKeyboardType = .default private var keyboardType: UIKeyboardType = .default
private var isPasswordField: Bool = false private var isPasswordField: Bool = false
@ -22,7 +22,7 @@ struct UIKitTextField: UIViewRepresentable {
init(_ titleKey: String, text: Binding<String>, keyboardType: UIKeyboardType = .default, isPasswordField: Bool = false, init(_ titleKey: String, text: Binding<String>, keyboardType: UIKeyboardType = .default, isPasswordField: Bool = false,
focusOnStart: Bool = false, focusNextTextFieldOnReturnKeyPress: Bool = false, actionOnReturnKeyPress: (() -> Bool)? = nil, textChanged: ((String) -> Void)? = nil) { focusOnStart: Bool = false, focusNextTextFieldOnReturnKeyPress: Bool = false, actionOnReturnKeyPress: (() -> Bool)? = nil, textChanged: ((String) -> Void)? = nil) {
self.placeHolder = titleKey self.placeholder = titleKey
_text = text _text = text
self.keyboardType = keyboardType self.keyboardType = keyboardType
@ -39,7 +39,7 @@ struct UIKitTextField: UIViewRepresentable {
func makeUIView(context: UIViewRepresentableContext<UIKitTextField>) -> UITextField { func makeUIView(context: UIViewRepresentableContext<UIKitTextField>) -> UITextField {
let textField = UITextField(frame: .zero) let textField = UITextField(frame: .zero)
textField.placeholder = placeHolder.localize() textField.placeholder = placeholder.localize()
textField.keyboardType = keyboardType textField.keyboardType = keyboardType
textField.isSecureTextEntry = isPasswordField textField.isSecureTextEntry = isPasswordField