Hello everyone!
While trying to complete the Bronze Challenge, I stumbled into an issue.
Logically, we would try to create a character set encompassing all of the valid characters, such as this:
var validCharacters = NSCharacterSet.decimalDigits
validCharacters.insert(".")
But this leaves out the backspace button, which becomes unavailable to the user. So I thought I can add the backspace button’s Unicode scalar to the set like so:
validCharacters.insert(UnicodeScalar(8))
With 8 being the index of the scalar relative to the backspace character.
Yet, this solution still does not work for me. Any of you have a hint on how this could be solved?
Thank you in advance