title: Ios - how do I show/hide fields when a switch changes on/off
body: <p>I have a switch in my screen, and when the user wants that option to be on, I need to collect some more information from that user. So I need to present two text fields. And if the user does not want to use that feature, then they select the off switch, and I do not need to collect the contact information, and I would like to hide the text fields which collect the information.</p>
  
  <p>Here is my sceen:</p>
  
  <p><img src="https://i.stack.imgur.com/Mtf7A.png" alt="enter image description here"></p>
  
  <p>Where do I need to put the "listener" and the code to hide/show the extra text fields and labels when the user toggles a switch?</p>
  
  <p>Thanks!</p>