Knowing the complete changed string in textField:shouldChangeCharactersInRange:replacementString:

前端 未结 3 1535
执念已碎
执念已碎 2021-02-02 08:25

I just asked a question about how to monitor changes to a UITextField and received this response :

- (BOOL)textField:(UITextField *)textField should         


        
3条回答
  •  暖寄归人
    2021-02-02 08:48

    NSString * proposedNewString = [[textField text] stringByReplacingCharactersInRange:range withString:replacementString];
    

提交回复
热议问题