質問

I want to create a UIKeyboard type that will look like the following.

enter image description here

This app is only for iPad and none of the default keyboard type seem to match.

Any suggestions for adding buttons to the keyboard type?

役に立ちましたか?

解決

I may be wrong, but what that looks like is the standard keyboard with a custom toolbar on top. It was most likely done using the inputAccessoryView property for the textfield:

[textField setInputAccessoryView:inputAccView];

Here is where I took the example from.

他のヒント

As far as I am aware, this is not supported in a super easy way by default iOS system keyboards. However, you can specify your own UIView as an "input accessory view" for a text field. Specifically, look at this method in the UITextField documentation: inputAccessoryView.

So you should just be able to create a UIView, style it to look very similar to the usual system keyboard UI, add UIButtons, and set it as the "input accessory view" But you will have to do your own work to make the background of the accessory view and the buttons on it fit well with the system keyboard.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top