Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when i called btn.showAnimatedSkeleton(), UIButton can't hide text #309

Closed
greatsk55 opened this issue Jul 24, 2020 · 5 comments · Fixed by #323
Closed

when i called btn.showAnimatedSkeleton(), UIButton can't hide text #309

greatsk55 opened this issue Jul 24, 2020 · 5 comments · Fixed by #323
Assignees

Comments

@greatsk55
Copy link

⚠️ Please fill out this template when filing an issue.

🙏🏼 Please check if it already exists other issue related with yours.

What did you do?

I want to showanimatedSkeleton to a UIButton.

What did you expect to happen?

When I called btn.showAnimatedSkeleton(), I expected it to be animated like any other view.

What happened instead?

Skeleton animation was the same, but the text of the UIButton came out.

@Juanpe
Copy link
Owner

Juanpe commented Aug 28, 2020

Hi @greatsk55 ,

Could you give me more details about your problem? I've checked and the skeleton appears and the text is out...
button_skeleton

@hrool20
Copy link

hrool20 commented Sep 1, 2020

I have the same problem. I'm using XIB's and I have this structure.

I'm not using custom buttons and inside viewDidLoad() function, I'm calling:

view?.showAnimatedGradientSkeleton(usingGradient: gradient, animation: animation, transition: .crossDissolve(0.0))

@Juanpe
Copy link
Owner

Juanpe commented Sep 8, 2020

Hi! I'm checking this issue but I need more info about it. Which Xcode version and iOS are you using?

@hrool20
Copy link

hrool20 commented Sep 8, 2020

I'm using:
Xcode version: 11.6.
Swift versión: Swift 5.
Minimum iOS version: 11.0.

I was researching and it seems that now when you add a layer on a button, it is added after de text. I'm not sure if it's because of the Swift version or Xcode version, but previously the layer was added before the text.

@Juanpe
Copy link
Owner

Juanpe commented Sep 9, 2020

I've merged a PR solving this problem. This fix will be available in the next version. Meanwhile, you can set the SkeletonView dependency line to point to the develop branch.

Podfile
pod 'SkeletonView', :git => 'https://github.com/Juanpe/SkeletonView.git', :branch => 'develop'

Anyway, I'd like to release the next version at the end of this week :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants