iOS 键盘是否可以编程(对于 App Store 应用程序)?
我可以制作一个应用程序来自定义 iOS 键盘以包含多字符按钮(如字符串),并且当用户按下这些按钮时,输出文本字符串吗?
我还可以像 Emojii 应用程序那样使用部分对按钮进行分类吗?
按钮标签的长度有限制吗? 您可以有多少个部分?
另外,在我的应用程序中,我希望这些是用户可定义的,因此键盘将根据用户在我的应用程序中编写的按钮标签、部分和输出字符串动态更新。
此应用程序必须获得 App Store 批准,而不是 Cydia 或 JB。 谢谢
Could I make an App which customises the iOS keyboard to contain multi-character buttons like strings and when the user presses those buttons, have a text string outputted?
Also could I use sections to categorise the buttons like the Emojii App does?
Is there limits on how long a Label for a button can be?
And how many sections you can have?
Also, in my App I want those to be user-definable, so the keyboard would dynamically update with what the user programs in my App for button labels, sections and output strings.
This App would have to be App Store approved not Cydia or JB.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你可以这么做。我必须承认,我不知道如何做到这一点,但就像 Wolframalpha 代数课程助理一样。你有像“sin”和“cosin”和“f(x)”这样的键。所以有某种方法可以做到这一点。继续研究!
You CAN do that. I have to admint I have no clue how, but like the Wolframalpha Courseassistant Algebra does it. You have key like "sin" and "cosin" and "f(x)". So there IS somehow method to do that. Keep on researching!
您可以使用 UITextField 或 UITextView(或实现 UITextInputTraits 协议的其他类)的
keyboardType
属性从少量提供的键盘中进行选择。或者(自 iOS 3.2 起)您可以在 UITextField 或 UITextView 的
inputAccessoryView
属性中设置一个视图,该视图将自动显示在键盘上方。或者您可以设置inputView
属性,用您自己的视图完全替换键盘。但请注意,UITextField 无法提供与光标位置正确交互的方法,而 UITextView 无法正确支持单行显示,因此其实用性非常有限。或者你可以尝试一些技巧,就像人们用来在 UIKeyboardTypeNumberPad 上获得“完成”按钮一样,但苹果很可能决定开始拒绝执行此类操作的应用程序。
You can use the
keyboardType
property of a UITextField or UITextView (or other class implementing the UITextInputTraits protocol) to select from a small number of provided keyboards.Or (since iOS 3.2) you can set a view in the UITextField or UITextView's
inputAccessoryView
property that will automatically be displayed above the keyboard. Or you can set theinputView
property to completely replace the keyboard with your own view. But note that UITextField provides no way to properly interact with the cursor position, while UITextView doesn't correctly support a single-line display, so this is of very limited utility.Or you could try some hacks like people use to get a "Done" button on UIKeyboardTypeNumberPad, but Apple may well decide to start rejecting apps that do that sort of thing.
您无法修改键盘。您只能在键盘顶部附加视图..就像 safari 在文本字段上所做的那样。 (下一个/上一个按钮)
You can't mofify the keyboard. You can only attach a view on top of the keyboard.. like safari do on textfields. ( The Next/Prev Buttons )