سؤال

Is there a possibility to change the button layout on a pre-made ios keyboard?

I would like to add "done" and "punctuation" buttons to numeric keyboard. There is the Decimal Pad available but in this case i would have to add a custom done button at the top.

Is there a way to move the "delete" button to the right and make it half of its current width, put next to it the "decimal" button and on the former place of "delete" locate "done"?

هل كانت مفيدة؟

المحلول

No, you'll have to implement your own keyboard, if you duplicate the Apple one it will get rejected.

نصائح أخرى

iOS does not support making those types of changes to the keyboard, the only thing you can do is change the text associated with the Done/Enter button by changing the UIReturnKeyType of the associated UITextField.

You can make a View With the buttons you want and set the inputView to the custom view you made ,, and you got a custom keyboard :D

You cannot directly modify the keyboard other than by choosing one of apple's presets. However, it is possible to add additional keys above it using -inputAccessoryView, like WolframAlpha has done in its app.

It looks like you can replace the keyboard entirely, but the accesory view is probably the way to go. See the answer to Adding key to IPad keyboard

EDIT: For an example of how this would look, check out WolframAlpha's blog post on the subject. In your case the accessory view probably won't be quite so tall

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top