title: How do I create a simple backspace button on iOS?
body: <p>I have a custom numeric keypad on which I want to include a special "clear" button—more or less a backspace button that removes the last character. I can't find any way to get this button to work. Here's the simple code:</p>
  
  <pre><code>-(IBAction)buttonDigitPressed:(id)sender {
      currentNumber = currentNumber*10 + (double)[sender tag];
      priceOne.text = [NSString stringWithFormat:@"%.2f",currentNumber / 100.0f];
  }
  
  -(IBAction)cancelOperation {
      (backspace code goes here)
  }
  </code></pre>
  
  <p>Any ideas would be great! Thanks!</p>