Skip to content

Commit

Permalink
Add skeletonCornerRadius in SkeletonAppearance (Juanpe#478)
Browse files Browse the repository at this point in the history
* Add skeletonCornerRadius in SkeletonAppearance

* Remove unnecessary type casting
  • Loading branch information
tomcheung authored Jan 8, 2022
1 parent c5462de commit 947e2a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ public class SkeletonViewAppearance {

public var renderSingleLineAsView: Bool = false

public var skeletonCornerRadius: Float = 0

}
// codebeat:enable[TOO_MANY_IVARS]
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extension UIView {
}

var _skeletonableCornerRadius: Float {
get { return ao_get(pkey: &ViewAssociatedKeys.skeletonCornerRadius) as? Float ?? 0.0 }
get { return ao_get(pkey: &ViewAssociatedKeys.skeletonCornerRadius) as? Float ?? SkeletonViewAppearance.shared.skeletonCornerRadius }
set { ao_set(newValue, pkey: &ViewAssociatedKeys.skeletonCornerRadius) }
}
}

0 comments on commit 947e2a6

Please sign in to comment.