Embed using UIKit
The controllers provided by VideoEditor SDK can be embedded in an UINavigationController
.
Create the video editor#
Create the video editor by instantiating VideoEditViewController
and pass it the video asset to be edited.
In our example, we load an example video from the app bundle.
We further set the current class as the controller's delegate to handle cancellation.
Embed in an UINavigationController#
Create and present a navigation controller that hosts the video editor.
The video editor will now use the navigation controller's navigation bar for its cancel and save buttons instead of its own toolbar.
If the video editor is the navigation controller's root view controller, it will display the close button on the left side of the navigation bar and call videoEditViewControllerDidCancel(_:)
when the user taps on it.
If the video editor is not the navigation controller's root view controller, it will display the regular back button on the left side of the navigation bar and will not call videoEditViewControllerDidCancel(_:)
when the user taps on it.