mac-gallagher / Shuffle

🔥 A multi-directional card swiping library inspired by Tinder
MIT License
897 stars 138 forks source link

Make animation options structs instead of classes #142

Closed mac-gallagher closed 3 years ago

mac-gallagher commented 3 years ago

Previously, changing animation options would have to be done via creating a new CardAnimationOptions object and setting the card's animationOptions property. Now, one can modify the animation properties directly, e.g. card.animationOptions.totalSwipeDuration = 2.0

Additionally:

codecov-io commented 3 years ago

Codecov Report

Merging #142 (35a3957) into master (7b746c2) will decrease coverage by 2.3%. The diff coverage is 36.9%.

@@           Coverage Diff            @@
##           master    #142     +/-   ##
========================================
- Coverage    84.0%   81.7%   -2.4%     
========================================
  Files           9       9             
  Lines         707     700      -7     
========================================
- Hits          594     572     -22     
- Misses        113     128     +15     
Impacted Files Coverage Δ
...ses/SwipeCardStack/CardStackAnimationOptions.swift 0.0% <0.0%> (-100.0%) :arrow_down:
...fle/Classes/SwipeCardStack/CardStackAnimator.swift 0.0% <0.0%> (ø)
...uffle/Classes/SwipeCard/CardAnimationOptions.swift 33.3% <33.3%> (-66.7%) :arrow_down:
...urces/Shuffle/Classes/SwipeCard/CardAnimator.swift 100.0% <100.0%> (ø)
Sources/Shuffle/Classes/SwipeCard/SwipeCard.swift 100.0% <100.0%> (ø)
...huffle/Classes/SwipeCardStack/SwipeCardStack.swift 95.3% <100.0%> (ø)