How can I convert NSRange to Range in Swift?
NSRange
Range
I want to use the following UITextFieldDelegate method:
UITextFieldDelegate
func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool { let strString = ((textField.text)! as NSString).stringByReplacingCharactersInRange(range, withString: string) }