Closed efalloon closed 2 years ago
Hi @efalloon 👋🏼
I've checked this issue and I can't reproduce this issue. I mean, in the example project, if I set programmatically the corner radius, it works.
descriptionTextView.isSkeletonable = true descriptionTextView.showSkeleton(usingColor: .tertiarySystemFill, transition: .crossDissolve(1))
descriptionTextView.skeletonCornerRadius = 5 descriptionTextView.lastLineFillPercent = Int.random(in: 30..<75) descriptionTextView.skeletonLineSpacing = 12.5 descriptionTextView.isScrollEnabled = false
This is what my code currently looks like. Everything works except for the corner radius.
Ok, the problem is that you are not using the right property. You have to use linesCornerRadius
. And you have to set all the properties before show the skeleton as well.
Your code would look like this:
descriptionTextView.isSkeletonable = true
descriptionTextView.linesCornerRadius = 5
descriptionTextView.lastLineFillPercent = Int.random(in: 30..<75)
descriptionTextView.skeletonLineSpacing = 12.5
descriptionTextView.isScrollEnabled = false
descriptionTextView.showSkeleton(usingColor: .tertiarySystemFill, transition: .crossDissolve(1))
BTW, I think I should clarify this in the README file because it looks confusing
@efalloon, could you check it to close this issue, please? Thanks 👍🏼
I cannot set a line corner radius on a textview using the
.linesCornerRadius
function programatically. However, when I apply the said corner radius on storyboards, it works.