Open yonicsurny opened 8 months ago
Hi, I'm experiencing what appears to be memory leaks using ParallaxView.
The more I use the app, the more unreleased closures are kept in memory.
In my cell, I have a ParallaxView and I use a similar code as the one given in README of the project.
Relevant excerpt of the code:
@IBOutlet weak var posterView: ParallaxView! ... override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) { super.didUpdateFocus(in: context, with: coordinator) coordinator.addCoordinatedAnimations { [weak self] in guard let self = self else { return } if context.nextFocusedView == self { self.posterView.addParallaxMotionEffects() UIView.animate(withDuration: 0.15, delay: 0, options: .curveEaseOut) { self.posterView.transform = CGAffineTransform(scaleX: 1.1, y: 1.1) } } if context.previouslyFocusedView == self { self.posterView.removeParallaxMotionEffects() UIView.animate(withDuration: 0.3, delay: 0, options: .curveLinear) { self.posterView.transform = CGAffineTransform(scaleX: 1, y: 1) } } } }
Any idea what might be the issue? Thank you in advance!
Hi, I'm experiencing what appears to be memory leaks using ParallaxView.
The more I use the app, the more unreleased closures are kept in memory.
In my cell, I have a ParallaxView and I use a similar code as the one given in README of the project.
Relevant excerpt of the code:
Any idea what might be the issue? Thank you in advance!