-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
I am trying to load a previous story but cannot manage to do so.
Here is the function I am trying to implement which should be the opposite action to skip() :
func rewindOne() {
let currentSegment = segments[currentAnimationIndex]
currentSegment.topSegmentView.frame.size.width = 0
currentSegment.topSegmentView.layer.removeAllAnimations()
var newIndex = self.currentAnimationIndex - 1
if newIndex < 0 { newIndex = 0 }
if newIndex >= 0 {
self.delegate?.segmentedProgressBarChangedIndex(index: newIndex)
self.animate(animationIndex: newIndex)
}
}
The animation does not stop, I have 3 items, tried:
segments.forEach {
$0.topSegmentView.layer.removeAllAnimations()
}
The segment keeps being animated.
Metadata
Metadata
Assignees
Labels
No labels