title: UITextField - Allow only numbers and punctuation input/keypad
body: <p>I have tried the code below but that only allows for numbers on the keypad to be inputted. My app requires the keypad to use a period/full stop (for money transactions). The code I tried is:</p>
  
  <pre><code>- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
  
     NSCharacterSet *nonNumberSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet];
  
       if ([string rangeOfCharacterFromSet:nonNumberSet].location != NSNotFound)
        {
           return NO;
      }
     return YES;
  
  }
  </code></pre>
  
  <p>Thanks for any help.</p>