Giter VIP home page Giter VIP logo

Comments (5)

bfeher avatar bfeher commented on July 22, 2024

Hi fco-edno!

The animation is just a loop repeating forever that animates the .strokeEnd of each circle from 0 to 0.5. If you want to stop the animation at a specific point, you will need to remove the animation and then set the .strokeEnd of each circle to the desired value between 0 and 1.

I found this link on SO describing how to pause and resume a CABasicAnimation, but haven't been able to get it working. Perhaps you could give it a shot and submit a pull request if you get it working :)

from bfradialwaveview.

xico42 avatar xico42 commented on July 22, 2024

Got it working, how do i submit a pull request? Also, you may adjust the storyboard, Still do not know
about size classes and constraints ;), this way the button i added in the storyboard is not well placed.

from bfradialwaveview.

xico42 avatar xico42 commented on July 22, 2024

Just one more question, the number of topcircleLayers is the same of the bottomcircleLayers? I mean, always. The solution was simply iterate over the bottom and top circle layers, and do the way was done in that answer on SO. If the number of elements in the array would be always the same, i could make it with one for loop. The way i did it now, i did with two for loops.

from bfradialwaveview.

xico42 avatar xico42 commented on July 22, 2024

Figured it out, i have just sent you a pull request, only with the pauseAnimation and resumeAnimation
methods included. Without including anything in the example storyboard and using two for loops.

from bfradialwaveview.

bfeher avatar bfeher commented on July 22, 2024

Hi fco-edno!
Thanks a lot for your help with this! Yes in fact bottom and top should always be equal, and I don't really every check or enforce them to be the same, I always assume (which is unsafe...).
So two loops is fine, thanks :)

I'll take a look at your pull request in a few minutes. Thanks again!

from bfradialwaveview.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.