label disappear when changing font size to 25 in Swift(在 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 时标签消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Swift 中将字体大小更改为 25 时标签消失


基础教程推荐
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01