MojtabaHs / iPhoneNumberField

Elegant SwiftUI phone number textField.
MIT License
527 stars 87 forks source link

Example placeholder not showing if nil is passed as placeholder (SwiftUI) #111

Closed davidkessler-ch closed 1 week ago

davidkessler-ch commented 1 week ago

When not passing a placeholder string, no placeholder appears at all.

According to the README, I thought a default number should appear.

davidkessler-ch commented 1 week ago

It works when providing:

iPhoneNumberField(nil, text: $text, isEditing: $isEditing) {
                    $0.withExamplePlaceholder = true
                }

But I would have thought it should work out of the box...

davidkessler-ch commented 1 week ago

I will close this, as above solution is acceptable