Ramotion Animation Intiializes with Circle Layer shown
jstngoulet opened this issue · 3 comments
jstngoulet commented
There is an issue with RamotionBallLayer()
When you use the RamotionAnimation, a user can scroll down through a list (assuming the refresh is in header). When they scroll back up quickly, however, I noticed a bug where the while cirlce will appear, blocking content on the screen, even though it is not animating.
A quick-fix for this would be set the 'isHidden' attribute in the initialization method as shown below:
class RamotionBallLayer: CALayer {
init(frame: CGRect, duration: CFTimeInterval, moveUpDist: CGFloat, color: UIColor = .white) {
upDuration = duration
super.init()
self.frame = frame
let circleWidth = min(frame.size.width, frame.size.height)
circleLayer = CircleLayer(size: circleWidth, moveUpDist: moveUpDist, frame: frame, color: color)
addSublayer(circleLayer)
// Hide the ball layer on init
isHidden = true
}
}
Kishorekumar-Elanchezhiyan commented
please let me know if it is fixed in latest version 1.0.9
StephanWalters commented
@Kishorekumar-Elanchezhiyan no it still doesn't work. @jstngoulet quick fix does. (setting isHidden = true in the init() method)
imwcl commented
thx,fixed in 1.1.2