CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Oct 2017 |
Maintained by ihoudf.
requires iOS 6.0+.
1.Download all the files in the DFLabelSizeFit subdirectory.
2.Add the DFLabelSizeFit group to your Xcode project.
3.import "DFLabelSizeFit.h
1.single line text. the label height you get is the fontsize.According textAlignment set label's frame.
- (UILabel *)df_labelSizeFit;
- (UILabel *)df_labelSizeFitWithLineSpacing:(CGFloat)lineSpacing
singleLineKeepWidth:(BOOL)singleLineKeepWidth;
@Param lineSpacing lineSpacing
@Param paragraphSpacingBefore paragraphSpacingBefore
@Param alignment alignment
@Param isFirstLineHeadIndent isFirstLineHeadIndent
- (UILabel *)df_labelSizeFitWithLineSpacing:(CGFloat)lineSpacing
paragraphSpacingBefore:(CGFloat)paragraphSpacingBefore
alignment:(NSTextAlignment)alignment
isFirstLineHeadIndent:(BOOL)isFirstLineHeadIndent;
provided under the MIT license. See LICENSE file for details.
最低支持 iOS 6.0
1.下载 DFLabelSizeFit 文件夹内的所有内容。
2.将 DFLabelSizeFit文件夹添加(拖放)到你的工程。
3.import "DFLabelSizeFit.h"
1.单行。返回label高度为你设置的font的值的pointSize。并根据textAlignment设置label的位置。
- (UILabel *)df_labelSizeFit;
- (UILabel *)df_labelSizeFitWithLineSpacing:(CGFloat)lineSpacing
singleLineKeepWidth:(BOOL)singleLineKeepWidth;
- (UILabel *)df_labelSizeFitWithLineSpacing:(CGFloat)lineSpacing
paragraphSpacingBefore:(CGFloat)paragraphSpacingBefore
alignment:(NSTextAlignment)alignment
isFirstLineHeadIndent:(BOOL)isFirstLineHeadIndent;
使用 MIT 许可证,详情见LICENSE 文件。
合作qq:188816190