iOS Developer Library — Pre-Release

Developer

UIKit Framework Reference UIVideoEditorControllerDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

UIVideoEditorControllerDelegate

Inheritance


Not Applicable

Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 3.1 and later.

The UIVideoEditorControllerDelegate protocol defines methods that your delegate object must implement to respond to the video editor. The methods of this protocol notify your delegate when the system has saved an edited movie or the user has cancelled editing to discard any changes. There is also a method for responding to errors encountered by the video editor.

The delegate methods are responsible for dismissing the video editor when the operation completes. To dismiss the editor, call the dismissModalViewControllerAnimated: method of the parent controller responsible for displaying the video editor. The video editor is described in UIVideoEditorController Class Reference.

  • Called when the system has finished saving an edited movie. (required)

    Declaration

    Swift

    optional func videoEditorController(_ editor: UIVideoEditorController, didSaveEditedVideoToPath editedVideoPath: String)

    Objective-C

    - (void)videoEditorController:(UIVideoEditorController *)editor didSaveEditedVideoToPath:(NSString *)editedVideoPath

    Parameters

    editor

    The video editor that has finished editing and saving a movie.

    editedVideoPath

    The filesystem path to the edited movie.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 3.1 and later.

  • Called when the user has cancelled a movie editing operation. (required)

    Declaration

    Swift

    optional func videoEditorControllerDidCancel(_ editor: UIVideoEditorController)

    Objective-C

    - (void)videoEditorControllerDidCancel:(UIVideoEditorController *)editor

    Parameters

    editor

    The video editor that the user cancelled, not wanting to save changes.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 3.1 and later.

  • Called when the video editor is unable to load or save a movie. (required)

    Declaration

    Swift

    optional func videoEditorController(_ editor: UIVideoEditorController, didFailWithError error: NSError)

    Objective-C

    - (void)videoEditorController:(UIVideoEditorController *)editor didFailWithError:(NSError *)error

    Parameters

    editor

    The video editor that was unable to load or save a movie.

    error

    The loading or saving error.

    Discussion

    Loading a movie into the video editor could fail because of an invalid filesystem path or an invalid media format. Saving could fail because of a lack of disk space or other reasons.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 3.1 and later.