At WWDC 2020, Apple introduced a view that can play local videos or videos from a URL. Is there a way to disable the default video controls (play/pause/scrubber/etc) on the new SwiftUI VideoPlayer in iOS14, so I could create a custom one?
Disclaimer: You won’t be able to use videos from YouTube.
“A view that displays the video content from a player object along with system-supplied playback controls.” — Apple Developer
To follow along with this tutorial, you’ll need some basic knowledge in:
Note: This only supports iOS 14+.
To begin, you will first need to import the required module:
For the purpose of illustration, I will download the Nyan Cat video from YouTube, which will have an mp4 extension. The file will then be placed inside the project as shown below. Please make sure that the target is selected or else your app will crash:
Please test this only on your device. Testing it on the simulator will not work.
Build a number of different rotation animations How to Build a Rotation Animation in SwiftUI
Build a bottom card view with a drag gesture. First, let’s make our CardView. For the tutorial, I only have a ZStack with color and some text.
In this Video i'm going to show how to create a Stylish Courses App UI With Custom Tab Bar - Navigation Views And With Swipe Gestures Using SwiftUI 2.0
In this Video i'm going to show how to Implement Twitter Splash Screen Using Xcode 12 And SwiftUI 2.0
2 solutions for routing in SwiftUI. The router is defined by a protocol, which the View will require in the constructor. The viewFor(route: _, content: _) function should take a 'route', ...