Compare commits

...

2 Commits

Author SHA1 Message Date
ankitagarwal007 6b5002b9a7 Use fontLine for skeleton in labels (#427)
Co-authored-by: Ankit Agarwal <ankit.agarwal@naukri.com>
2021-08-19 08:04:01 +02:00
Juanpe 2d9f3192d3 Bump version 1.22.0 2021-08-17 17:08:39 +00:00
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SkeletonView"
s.version = "1.21.2"
s.version = "1.22.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.
+7 -1
View File
@@ -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 {