Relative Content

Tag Archive for swiftswiftuiavfoundation

Video Rendering Not Smooth In ScrollView

I have a basic SwiftUI scroll view that houses many videos. When I take out the red color inside the video player the scroll view is very smooth and I can swipe down and up as fast as I can without any glitches. However, when I add the red color and swipe down and then swipe up the scroll view glitches as the videos render once again. How can I fix this glitch? Also apps such as Instagram or Twitter have videos already rendered right when they appear, and scrolling away and coming back will not cause them to re-render. How can I achieve such behavior? Doing this might fix the glitch when the videos render.