带有 UITextView 的 iPhone 键盘
我觉得这个问题已经被问了10^78次,但由于某种原因,我找不到问题,也找不到答案..
我想添加一个顶部带有uitextView的键盘..就像默认的短信应用程序一样在 iPhone 上..
我该怎么做?
*奖励:如果您还可以给我一个关于如何使用键盘设置动画的提示(当键盘动画消失时下降..并随着键盘上升);
I feel that this question has been asked 10^78 times, but for some reason, am unable to find the question, nor the answer ..
I want to add a keyboard with a uitextView at the top .. Exactly like the default SMS application on the iPhone ..
How can I do that?
*Bonus: if you can also give me a hint as to how to animate it with the keyboard (goes down when the keyboard animates out .. and goes up with the keyboard);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用
UIToolbar
(包含文本视图等)并将UITextView
的inputAccessoryView
属性设置为该工具栏。动画应该在没有任何额外代码的情况下发生。请参阅 http://www .randomsequence.com/articles/adding-a-toolbar-with-next-previous-above-uitextfield-keyboard-iphone/
You need to use a
UIToolbar
(containing your text views, etc.) and set theinputAccessoryView
property of theUITextView
to that toolbar. The animation should take place without any additional code.See http://www.randomsequence.com/articles/adding-a-toolbar-with-next-previous-above-uitextfield-keyboard-iphone/