在 Swift 中将字体大小更改为 25 时标签消失

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

问题描述

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

描述标签属性检查器另外代码截图是

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

标签仅在框架低于 8000 时显示文本,并且不显示更多文本.

对于较低的标签设置这个.

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

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

image for disappear label when size is 25

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

github link for problem

解决方案

@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.

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 时标签消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Why local notification is not firing for UNCalendarNotificationTrigger(为什么没有为UNCalendarNotificationTrigger触发本地通知)
Pushing UIViewController above UITabBar(将UIView控制器推送到UITabBar上方)
Dropbox Files.download does not start when number of files in folder is gt; 1000(当文件夹中的文件数为1000时,Dropbox Files.Download不会启动)
appearance().setBackgroundImage Not Working On Custom Class(外观().setBackoundImage在自定义类上不起作用)
Show/Hide barButtonItem(显示/隐藏barButtonItem)
java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type(异常:不应为错误类型创建SimpleTypeImpl)