From 6b5002b9a72211aa478d0484b1332107c18b2f4c Mon Sep 17 00:00:00 2001 From: ankitagarwal007 Date: Thu, 19 Aug 2021 11:34:01 +0530 Subject: [PATCH 1/2] Use fontLine for skeleton in labels (#427) Co-authored-by: Ankit Agarwal --- Sources/Multilines/UILabel+Multiline.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Sources/Multilines/UILabel+Multiline.swift b/Sources/Multilines/UILabel+Multiline.swift index 5a750650..b0b88634 100644 --- a/Sources/Multilines/UILabel+Multiline.swift +++ b/Sources/Multilines/UILabel+Multiline.swift @@ -29,7 +29,13 @@ public extension UILabel { extension UILabel: ContainsMultilineText { var lineHeight: CGFloat { - backupHeightConstraints.first?.constant ?? SkeletonAppearance.default.multilineHeight + if let fontLineHeight = font?.lineHeight { + if let heightConstraints = backupHeightConstraints.first?.constant { + return (fontLineHeight > heightConstraints) ? heightConstraints : fontLineHeight + } + return fontLineHeight + } + return SkeletonAppearance.default.multilineHeight } var lastLineFillingPercent: Int { From 35db69e513f9385723814132b337627a4f264f5b Mon Sep 17 00:00:00 2001 From: Juanpe Date: Thu, 19 Aug 2021 06:15:26 +0000 Subject: [PATCH 2/2] Bump version 1.23.0 --- SkeletonView.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SkeletonView.podspec b/SkeletonView.podspec index 05d84ae8..99ebefb6 100644 --- a/SkeletonView.podspec +++ b/SkeletonView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SkeletonView" - s.version = "1.22.0" + s.version = "1.23.0" s.summary = "An elegant way to show users that something is happening and also prepare them to which contents he is waiting" s.description = <<-DESC Today almost all apps have async processes, as API requests, long runing processes, etc. And while the processes are working, usually developers place a loading view to show users that something is going on.