title: How to delete first character in a textfield and update the contents?
body: <p>I have a textfield with a default decimal pad. I have created a button and so when the button is pressed, it gets the current numbers in the textfield and makes it into a minus. E.g. if 5 was in the textfield and the button was pressed, -5 would now be in the textfield. I've got this part working but the opposite does not work. So if the user presses the button again, the minus number should now be convertered into a positive number. E.g. -5 should now be 5.</p>
  
  <pre><code>if(!(currentSelectedTF.text?.contains("-"))!){
          var selectedtext = "-" + currentSelectedTF.text!;
          currentSelectedTF.text = selectedtext;
      }else{
          var selectedtext = currentSelectedTF.text!.suffix(from: (currentSelectedTF.text?.startIndex)!);
          currentSelectedTF.text = selectedtext;
      }  
  </code></pre>
  
  <p>This is the logic im trying to implement when the button is clicked. but I am getting the following error:</p>
  
  <pre><code>Cannot assign value of type 'String.SubSequence' (aka 'Substring') to type 'String?'
  </code></pre>
  
  <p>Anyone know why? I am using swift 4</p>