Prevent default keyboard from showing when UITextField is pressed

前端 未结 3 688
忘了有多久
忘了有多久 2020-12-20 19:45

Is there a way to make a custom keyboard to pop up when a user presses on a UITextField. I have a view with a custom keypad on it and I want that to come up when the user pr

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-20 20:02

    Since iOS 3.2 there's a property for exactly that, called inputView.

    just go like this: [myTextField setInputView:myInputView] - where myInputView is obviously your custom input view. Then the system will pop up your view instead of the predefined keyboards.

提交回复
热议问题