下面代码的 Swift 构造函数是什么?
NSMakeRange(0, textfield.text!.characters.count)
用于此目的的现代 Swift 构造函数是 NSRange(location:length:)
。
NSRange(location: 0, length: textfield.text!.characters.count)