Numeric keyboard with decimal

In storyboard go to Attribute Inspector. There you can change keyboard type.You can check here


Select Decimal Pad in Keyboard Type for Text Field in Attribute Inspector.

Refer the image below for more detail

enter image description here


set keyboard type to textField in swift 3

@IBOutlet weak var txtNumber: UITextField!  

override func viewDidLoad(){

    self.txtNumber.keyboardType = .decimalPad
}

Simply change the keyboard type:

self.someTextField.keyboardType = UIKeyboardType.decimalPad

See the documentation for all the keyboard types.