0
I was normally using this code in a Swift 2.0 project, then decided to upgrade the project to version 3.0 and adapt some functions that changed... Only the last "squeak" argument I can’t adapt.
Code in Swift 2.0:
if let range = string.rangeOfCharacterFromSet(invalidCharacters, options: nil, range:Range<String.Index>(start: string.startIndex, end: string.endIndex)) {
return false
}
Code on Swift 3.0:
if let range = string.rangeOfCharacter(from: invalidCharacters, options: [], range: ){
return false
}
Thanks Leo, it worked out just fine!
– JdsMedeirosBR
You’re welcome Jadson.
– Leo Dabus