UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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

3      

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!

3      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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.