如何重建EMail-App文本样式?
我想要一个文本发送视图,就像苹果电子邮件应用程序中的发送电子邮件视图一样。 (默认的 iPhone 电子邮件应用程序)。
我尝试了带有 2 个 TextFields 和 1 个 TextView 的 UIScrollView,但看起来不太好,滚动视图没有功能,并且当我在 TextView 中输入文本时视图不会滚动(当我键入时,文本隐藏在第三行中。)这
是一张图片: http://s3.imgimg.de/uploads/Bildschirmfoto20110823um1156940f792556940f791456940f79png.png
它应该看起来像这样: http://a5.mzstatic.com/us/r1000/032/Purple/ea/4f/03/mzl.bxracfen.320x480-75.jpg
如何重建?
I want to have a text-send view like the send-email view from the email app by apple. (the default iPhone emailapp).
I tried a UIScrollView with 2 TextFields and 1 TextView, but it looks not good, the scrollview has no function and the view does not scroll when I enter a text in the TextView (the text is hiding in the third line when I type...
Here is a picture:
http://s3.imgimg.de/uploads/Bildschirmfoto20110823um1156940f792556940f791456940f79png.png
It should look like this:
http://a5.mzstatic.com/us/r1000/032/Purple/ea/4f/03/mzl.bxracfen.320x480-75.jpg
How to rebuild?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您开始在 UITextfield 中写入文本时,要向下滚动,请使用以下方法:
此外,当您编辑 TextView 时(即在 textViewDidBeginEditing 方法中),请将其框架缩小,以便使其完全可见。然后,当您完成编辑文本(即在 textViewDidEndEditing 方法中)时,将框架设置为原来的样子。
编辑:
现在编辑完成后,将高度设置为之前的高度。
to scroll downside when you start writing the text inside UITextfield, use this :
Also, when you edit your TextView (i.e in the textViewDidBeginEditing method), make its frame smaller so as to make it fully visible. Then, when you finish editing the text (i.e in the textViewDidEndEditing method) set the frame to whatever it was, originally.
EDIT:
Now when editing is completed, set the height to as it was before.