Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Gustavo Máximo

(React.js) Animations not working on iOS.

Go to solution Solved by Gustavo Máximo,

Recommended Posts

Hi, I'm new to GreenSock and I'm having some problems with the animations on iOS, here's the sample code:

 

    useEffect(() => {
        gsap.from(titleRef.current, {
            delay: 0.250,
            duration: 0.5,
            opacity: 0,
            x: 0,
            y: -100
        });
        gsap.fromTo(imagesRefs.map(=> e.current), {
            duration: 0.5,
            opacity: 0,
            x: 0,
            y: -100,
        }, {
            delay: 0.5,
            duration: 0.5,
            opacity: 1,
            x: 0,
            y: 0,
            stagger: {
                amount: 0.5
            }
        });
        gsap.from(detailsRefs.map(=> e.current), {
            delay: 1.2,
            duration: 0.5,
            opacity: 0,
            x: 0,
            y: -100,
            stagger: {
                amount: 0.5
            }
        });
    }, [imagesRefs.length]);

A simple code that runs when the after some images are loaded. However it breaks completely on iOS.

 

Video Example 1: 

 

 

Video Example 2: 

 

Here's the application link for real time testing:

 

http://gustavomaximo.dev/

 

The code posted above (and shown in the videos) is from a "/projects" page.

 

Example:

 

https://gustavomaximo.dev/projects/maxs-node-blog

 

The specific code that runs in these pages and contains the snippet posted at the beginning of this post can be found at:

https://github.com/GoldenMaximo/GoldenMaximo-Frontend/blob/main/src/pages/project/[slug].js

 

Any help or insight would be highly appreciated. Thanks.

Link to comment
Share on other sites

  • Solution

Turns out it wasn't caused by GSAP. It was a recurring listener that stayed active throughout different pages.

 

Mods delete this post if you want.

  • Like 1
Link to comment
Share on other sites

Thanks for letting us know. It's actually a good thing to leave here just in case someone else runs into a similar problem. 

 

Happy tweening!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×