MojtabaHs / iPhoneNumberField

Elegant SwiftUI phone number textField.
MIT License
542 stars 90 forks source link

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

Closed davidkessler-ch closed 2 months ago

davidkessler-ch commented 2 months 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 2 months 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 2 months ago

I will close this, as above solution is acceptable