Interface PHContentEditingController


  • public interface PHContentEditingController
    Protocol to which the principal view controller of the extension must conform.
    • Method Detail

      • canHandleAdjustmentData

        boolean canHandleAdjustmentData​(PHAdjustmentData adjustmentData)
        Query whether the receiver can handle (i.e. can decode and render) the given adjustment data.
      • cancelContentEditing

        void cancelContentEditing()
        Called if the user cancels the editing session. (Can be called while the receiver is producing the editing output.)
      • finishContentEditingWithCompletionHandler

        void finishContentEditingWithCompletionHandler​(PHContentEditingController.Block_finishContentEditingWithCompletionHandler completionHandler)
        Called when the user finishes the editing session. The receiver should prevent the user from editing the asset further. Also, it should create the editing output and call the completion handler. The completion handler returns after the output has been consumed, so it is safe to perform clean up after it returns. The completion handler can (and should best) be called on a background queue.
      • shouldShowCancelConfirmation

        boolean shouldShowCancelConfirmation()
        Returns whether the user should be prompted when canceling the editing session.
      • startContentEditingWithInputPlaceholderImage

        void startContentEditingWithInputPlaceholderImage​(PHContentEditingInput contentEditingInput,
                                                          UIImage placeholderImage)
        Provides the input for the editing session. The placeholder image represents the current version of the asset (with adjustments baked in), and can be used as UI placeholder, in case rendering the adjustments from the input cannot be done in a timely fashion.