Skip to content

Commit

Permalink
fix: Consider the bottom edge inset when updating the skeleton layer.
Browse files Browse the repository at this point in the history
  • Loading branch information
xpereta committed Aug 31, 2020
1 parent 5a27b37 commit d8e7f6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Extensions/CALayer+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ extension CALayer {

func updateLayerFrame(for index: Int, size: CGSize, multilineSpacing: CGFloat, paddingInsets: UIEdgeInsets) {
let spaceRequiredForEachLine = SkeletonAppearance.default.multilineHeight + multilineSpacing
frame = CGRect(x: paddingInsets.left, y: CGFloat(index) * spaceRequiredForEachLine + paddingInsets.top, width: size.width, height: size.height)
frame = CGRect(x: paddingInsets.left, y: CGFloat(index) * spaceRequiredForEachLine + paddingInsets.top, width: size.width, height: size.height - paddingInsets.bottom)
}

private func calculateNumLines(for config: SkeletonMultilinesLayerConfig) -> Int {
Expand Down

0 comments on commit d8e7f6f

Please sign in to comment.