15.8. Editing Videos on an iOS Device
You want the user of your application to be able to edit videos straight from your application.
UIVideoEditorController class. In this
example, we will use this class in conjunction with an image picker
controller. First we will ask the user to pick a video from her photo
library. After she does, we will display an instance of the video editor
controller and allow the user to edit the video she picked.
the iOS SDK allows programmers to display a video editor interface to
the users of their applications. All you have to do is provide the URL
of the video that needs to be edited and then present the video editor
controller as a modal view. You should not overlay the view of this
controller with any other views, and you should not modify this
immediately after calling the
of a view controller will terminate your application
with a runtime error. You must wait for the first view controller to
be dismissed and then present the second view controller. You can take
advantage of the
instance method of your view controllers to detect when your view is
displayed. You know at this point that any modal view controllers must
So let’s go ahead and declare the view controller and any necessary properties:
#import <MobileCoreServices/MobileCoreServices.h> ...