Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面代码的 Swift 构造函数是什么?
NSMakeRange(0, textfield.text!.characters.count)
现代的 Swift 构造函数是NSRange(location:length:).
NSRange(location:length:)
NSRange(location: 0, length: textfield.text!.characters.count)