Add Separator "-" in text field in Swift iOS
<p>I would like to add "<strong>-</strong>" between 4 numbers when user is typing in <strong>PinNo</strong> text field. <br>
For example, <strong>1234 - 5678 - 9932</strong> <br></p>

<p><a href="https://i.stack.imgur.com/8d41g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8d41g.png" alt="enter image description here"></a></p>