SDWebImage / SDWebImageSwiftUI

SwiftUI Image loading and Animation framework powered by SDWebImage
https://sdwebimage.github.io/SDWebImageSwiftUI
MIT License
2.1k stars 216 forks source link

Fix the case which sometimes the player does not stop when WebImage it out of screen #236

Closed dreampiggy closed 1 year ago

dreampiggy commented 1 year ago

This consume CPU because CADisplayLink is still running in the background

Solution

Using the ZStack as a container to distinguish the container disappear vs frame disapppear

See: https://twitter.com/unixzii/status/1573281351939530752

Demo

Pay attention to the CPU usage (compared to previous v2.2.0 behavior)

demo.mov.zip