如何自动调整UITextView的大小?
我想制作语音气泡,但在 UITextView 中调整气泡大小时出现问题。
根据文本的长度自动增加 Textview 的大小?
有没有办法使用 UITextView
I want to make speech bubbles but there is a problem adjusting size of the bubbles in UITextView.
is there a way to increase the size of the Textview automatically depending on the length of the
text by using UITextView?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想我明白你的意思。前几天我遇到了这个问题。这段代码将调整 UITextView 的内容。创建一个新类并通过新类调用它。如果你想很好地调整视图,我仍在努力:-P
希望这会有所帮助
I think I understand what your getting at. I had this problem the other day. This bit of code will adjust the UITextView contents. Create a new class and call this into it via a new class. If you want to adjust the View well I'm still working on that :-P
Hope this helps
好吧,我找到了一种更好的方法来完成我的建议。而不是处理 UIView 并根据其中的文本调整大小。我刚刚使 UITextView 具有圆形边缘,现在看起来像一个面板。完美的。希望这对某人有帮助!
如果您对代码感兴趣
Okay I found a better way of doing what I was suggesting. Rather then deal with the UIView and resizing depending on the text inside it. I just made the UITextView have a rounded edge which now looks like a panel. Perfect. Hope this helps someone!
If your interested in the code