-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Labels
Description
Prerequisites
- [x ] Put an
X
between the brackets on this line if you have done all of the following:- read our Wiki;
- read the entire Known issues section;
- checked that my issue isn't already filled;
- searched StackOverflow's
input-mask
tag for similar problems.
I have previous request #104 about first symbol
can you help me where I can fix that behavior, because I have multiple masks that comes from backend and I need to fill it correctly now I fix it only for phone number case.
open func put(text: String, into field: UITextField, autocomplete putAutocomplete: Bool? = nil, valueWithPrefix: Bool = false) -> InputMask.Result
I add value with prefix parameter that duplicate first char, but I have case where I just put masks from backend I look at apply func in Mask, but I can't find solution
if valueWithPrefix && !updatedText.isEmpty {
if let first = updatedText.first {
let firstCharacter = String(first)
updatedText = firstCharacter + updatedText
}
}