作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在 UICollectionView
中有一个包含 4 行的 UILabel
。当少于 4 行时,我希望文本位于顶部而不是中心。
谢谢..
最佳答案
这是解决方案
dispatch_async(dispatch_get_main_queue(), ^{
yourLabel.numberOfLines = 0;
[yourLabel sizeToFit];
});
关于ios - UILabel 顶部对齐多行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19519740/
我是一名优秀的程序员,十分优秀!