title: Textfield cannot type in or not showing key in number
body: <p>I have a text field named "Security Code" which using number keyboard. But when I type in, nothing showing. (The other text fields all working well)</p>
  
  <p><a href="https://i.stack.imgur.com/Zzkk3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zzkk3.jpg" alt="Cannot Type in &quot;Security Code&quot; Textfield"></a></p>
  
  <p>Error Message:</p>
  
  <pre><code>Can't find keyplane that supports type 4 for keyboard iPhone-PortraitTruffle-NumberPad; using 20615_PortraitTruffle_iPhone-Simple-Pad_Default
  </code></pre>
  
  <p>I searched this error message and got the answer that using <code>hardware-&gt;keybard-&gt;connect hardware keyboard</code> to solve. But I think it is another issue and do not solve my problem. For both real device and simulator this problem both exist. By the way, the number keyboard will pop up normally, but when I tap on the keyboard, nothing show in the textfield. </p>
  
  <p>I tried to change the keyboard type from number pad to default or other keyboard but also not working.</p>
  
  <p>I think it might because the text field is not getting what I type in correctly.</p>
  
  <p>Here are some of my code: (AddCreditCardVC.swift)</p>
  
  <pre><code>    @IBOutlet weak var txtSecurityCode: SkyFloatingLabelTextField! {
          didSet{
              txtSecurityCode.isMandatory = true
          }
      }
  
      @objc func commonInit() {   
          txtSecurityCode.text = "abc"
          txtSecurityCode.isEnabled = false      
      }
  
      @objc func addCreditCard() {
          viewModel.securityCode = txtSecurityCode.text
  
          viewModel.addCreditCard(success: {
              // post noti
              self.postCreditCardUpdatedNoti()
              self.dismiss(animated: true)
          }) {
              self.showAlert($0)
          }
      }
  
      @objc func initTextFields() {
          creditCardMaskDelegate.listener = self
          txtSecurityCode.delegate = self
          setupSkyTextFields(textField: txtSecurityCode, placholder: "Security Code *", title: "SECURITY CODE *", text: "", isMandatory: true)
          [txtCreditCardNo,txtExpiryYear,txtExpiryMonth,txtSecurityCode].forEach {
              $0?.errorTextColor = .black 
          }
      }
  
  extension AddCreditCardVC: MaskedTextFieldDelegateListener {
      func textField(_ textField: UITextField, didFillMandatoryCharacters complete: Bool, didExtractValue value: String) {
          // do nothing
      }
  }
  
  extension AddCreditCardVC: UITextFieldDelegate {
  
  
      func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -&gt; Bool {
  
  
          if textField == txtCreditCardNo {
              let card = STPCardValidator.brand(forNumber: textField.text ?? "")
              imgCardType.image = CardType(rawValue: card.rawValue)?.getCardLogo()
              cvcCount = CardType(rawValue: card.rawValue)?.getCvcCount() ?? 0
          }
  
          print("textField--&gt;", txtSecurityCode)
  
          if textField  == txtSecurityCode {
              guard let text = textField.text else { return true }
              let newLength = text.count + string.count - range.length
              return newLength &lt;= cvcCount
  
  
  
          }
          return true
      }
  
      func textFieldDidBeginEditing(_ textField: UITextField) {
  
          if textField == txtExpiryMonth {
              isExpireMonth = true
              expirePicker.isMonth = true
              expirePicker.setExpireMonth()
          }else if textField == txtExpiryYear {
              isExpireMonth = false
              expirePicker.setExpireYear()
          }
      }
  }
  </code></pre>
  
  <p>For the <code>print("textField--&gt;", txtSecurityCode)</code>, when I tap the keyboard in "security Code" textfield, it returns: </p>
  
  <pre><code>Optional(&lt;SkyFloatingLabelTextField.SkyFloatingLabelTextField: 0x7fd3a4173800; baseClass = UITextField; frame = (24 3; 148 41); text = ''; opaque = NO; autoresize = RM+BM; gestureRecognizers = &lt;NSArray: 0x600003bfbed0&gt;; layer = &lt;CALayer: 0x600003463bc0&gt;&gt;)
  </code></pre>
  
  <p>Update:
  From @matt's suggestion, added: return true in the first line of </p>
  
  <pre><code>func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -&gt; Bool {
  </code></pre>
  
  <p>and can type inside the textfield now. So the issue is that this function is not correct. </p>