Adam Adam - 7 months ago 50
iOS Question

How to hide keyboard while keeping cursor in swift

I am making a calculator and using my own keypad and i want there to be no keyboard that pops up when the textview is activated but i want the user to be able to move the cursor around. Any ideas are greatly appreciated.


you can change the inputView for the textfield to custom UIView. Something like below.

@IBOutlet weak var myTextField: UITextField!
let customView = UIView()

override func viewDidLoad() {

    myTextField.inputView = customView