title: Want to achieve the Keyboard selection through @IBInspectable
body: <p>I wanted to create a keyboard selection from @IBInspectabale</p>
  
  <p><a href="https://i.stack.imgur.com/HvqpL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HvqpL.png" alt="keyboard selection"></a></p>
  
  <p>How to achieve this</p>
  
  <p>I am creating a view, In which I insert an ImageView and a TextField,
  Now I am creating this custom view class as @IBDesignable and created the @IBInspectable elements.</p>
  
  <p>I successfully create side image and placeholder elements but now I am trying to create the keyboard type but facing issues.</p>
  
  <p>code snipped : `import UIKit</p>
  
  <p>@IBDesignable
  class CustomTextField: UIView,UITextFieldDelegate {</p>
  
  <pre><code>//custom view from the XIB file
  var view: UIView!
  
  @IBOutlet weak var textField: UITextField!
  @IBOutlet weak var imageView: UIImageView!
  
  override init(frame: CGRect) {
      super.init(frame: frame)
      loadViewFromNib ()
  }
  
  required init?(coder aDecoder: NSCoder) {
      super.init(coder: aDecoder)
      loadViewFromNib ()
  }
  
  func loadViewFromNib() {
      let bundle = Bundle(for: type(of: self))
      let nib = UINib(nibName: "CustomTextField", bundle: bundle)
      let view = nib.instantiate(withOwner: self, options: nil)[0] as! UIView
      view.frame = bounds
      view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
      self.addSubview(view);
  
  
  
  }
  
  @IBInspectable var sideImage: UIImage? {
      get {
          return imageView.image
      }
      set(sideImage) {
          imageView.image = sideImage
      }
  }
  
  @IBInspectable var placeHolderText: String? {
      get {
          return textField.placeholder
      }
      set(placeHolderText) {
          textField.placeholder = placeHolderText
      }
  }'
  </code></pre>
  
  <p>all the above working fine,
  but following is not working for me:</p>
  
  <pre><code>@IBInspectable var keyboard: UIKeyboardType? {
      get{
          return UIKeyboardType(rawValue: textField.keyboardType.rawValue)
      }
      set(keyboard){
          textField.keyboardType = keyboard!
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I tried it by creating enum but it does not give any result for me.</p>