Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
vicwork committed Mar 18, 2021
1 parent 57fdf9c commit 04c81d5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Sources/iPhoneNumberField/iPhoneNumberField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public struct iPhoneNumberField: UIViewRepresentable {

public func updateUIView(_ uiView: PhoneNumberTextField, context: UIViewRepresentableContext<Self>) {
configuration(uiView)

uiView.textContentType = .telephoneNumber //allow auto-fill to work with telephone text field
uiView.text = displayedText
uiView.font = font
uiView.maxDigits = maxDigits
Expand All @@ -175,7 +175,12 @@ public struct iPhoneNumberField: UIViewRepresentable {
uiView.withFlag = showFlag
uiView.withDefaultPickerUI = selectableFlag
uiView.withPrefix = previewPrefix
uiView.withExamplePlaceholder = autofillPrefix || placeholder == nil
//uiView.withExamplePlaceholder = autofillPrefix || placeholder == nil
if placeholder != nil {
uiView.placeholder = placeholder
} else {
uiView.withExamplePlaceholder = autofillPrefix
}
if autofillPrefix { uiView.resignFirstResponder() } // Workaround touch autofill issue
uiView.tintColor = accentColor

Expand Down

0 comments on commit 04c81d5

Please sign in to comment.