NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

How can I make a time warp scan video effect with SwiftUI?

Forums > iOS

Hello, I was wondering how I can make app that contain only this video effect, a time warp scan. I don't have idea how that should be made, I have basic logic, for example to stop every x milisecond and screenshot the entire screen then crop the photo and add that photo to array with other photos and make the whole image. I don't know if this is even possible with this logic, so I need some advice.

Here is a few examples of what I was thinking:

https://image.winudf.com/v2/image1/Y29tLmFwdXMudGltZXdhcnBzY2FuX3NjcmVlbl8wXzE2NTA0MjU3ODJfMDg5/screen-0.jpg?fakeurl=1&type=.webp https://www.tiktok.com/discover/scan-time-warp-effect?lang=en

   

Luka bypasses all the tutuorials and jumps into the deep end of the learning pool:

I was wondering how I can make app that contain only this video effect,
a time warp scan. I don't have idea how that should be made,

Did you examine Apple sample code?

See -> Capturing Video

I might suggest breaking your big problem into many smaller problems, but you've outlined your approach!

Luka outlines basic logic:

record video stream
overlay the live video stream with "scan bar"
stop capture stream every x milisecond
screenshot the entire screen
crop the photo stream under the "scan bar"
add that photo cropped section to array with other photos new image
assemble a new make the whole image

Nice! This is a great start. Come back and share your journey with us!

   

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until October 1st.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.