CSolanaM/SkeletonUI

Animation Is not trigger

Closed this issue · 1 comments

Hi There,

I'm trying to use the example to animate my skeleton. However, it's not getting animated.

To Reproduce
Steps to reproduce the behavior:

  1. Use the following Code:
Text("Finished requesting users!")
                    .skeleton(with: true)
                    .appearance(type: .solid(color: .red, background: .blue))
                    .animation(type: .pulse())
                    .background(Color.black)

Expected behavior
It should be animated

Screenshots
Captura de Pantalla 2022-08-08 a la(s) 19 01 12

What could be happening?

Best Regards

Hi @aluco100 !

I've been running into some issues regarding the animation in a side project where I'm also using it. It's a great way for debugging purposes in unusual contexts.

That's why I've created a new version (1.0.9) where I address the fix I spotted, and since this is very related to your issue, maybe could you try if it gets improved or solved?

Thanks

EDIT: Maybe the previous is not related, since I replaced the var body: some View code in the CharactersView.swift file of the provided examples by the library with your code:

Text("Finished requesting users!")
                    .skeleton(with: true)
                    .appearance(type: .solid(color: .red, background: .blue))
                    .animation(type: .pulse())
                    .background(Color.black)

And it worked. Could you try with the examples provided by the library? Also check if you have any parent View blocking the animations, such with .animation(nil)?

Simulator Screen Recording - iPhone 13 Pro Max - 2022-08-14 at 20 15 30

Thanks!