iOS automatically add hyphen in text field
问题 I\'m learning iOS development and am having a hard time figuring out the various events for the controls. For a test I have a UITextField where the user is meant to input a string in the format: XXXX-XXXX-XXXX-XXXX I want to be able to check how long the text in the field is after each entry and see if it needs to have a hyphen appended to it. I\'ve set up my IBAction function for this but when I assign it to the \"Value Changed\" event it does nothing, it works fine when I set it on the \