13
NSRange到Range <String.Index>
如何在Swift中转换NSRange为Range<String.Index>? 我想使用以下UITextFieldDelegate方法: func textField(textField: UITextField!, shouldChangeCharactersInRange range: NSRange, replacementString string: String!) -> Bool { textField.text.stringByReplacingCharactersInRange(???, withString: string)