在Swift中将字体大小更改为25时标签消失 [英] label disappear when changing font size to 25 in Swift

查看:87
本文介绍了在Swift中将字体大小更改为25时标签消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格视图和两个标签.第二个标签(描述标签)有数百行.当我将描述标签的字体大小设置为21时,它可以工作.当我将字体大小更改为25时,为什么描述标签消失了?怎么解决呢? 我还设置了自动调整单元格高度以增加大小.

I have a table view and two labels inside it. The second label(description label) has Hundreds of line. when I set font size of description label to 21 it's working. Why description label goes to dissappear when I am changing font size to 25? How to resolve it? I have also set auto resize cell height for increase size.

描述标签属性检查器 其他代码的屏幕截图是

description label attribute inspector alse code screenshot is

尺寸为25时用于消失标签的图像

image for disappear label when size is 25

标签仅在框架低于8000时显示文本,而对于更多文本则不显示.

label only show text when frame is under 8000 and for more text is not showing.

github问题链接

推荐答案

@dineshsharma ..让我们尝试一下,让我知道您是否仍然遇到问题. 这是顶部标签.

@dineshsharma.. Lets try this one and let me know if you are still facing the problem. This is for top label.

并为较低的标签设置此项.

And for lower label set this.

然后在属性检查器中,将两个标签的设置为0.并且请在索引和估计的高度tableview委托中实现行的高度.

And in attribute inspector set lines to 0 for both labels. And please implement height for row at index and estimated height tableview delegates.

这篇关于在Swift中将字体大小更改为25时标签消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆