iOS如何在照片编辑扩展中更新资产的位置?

时间:2015-09-11 20:29:05

标签: ios location photosframework

我正在使用照片编辑扩展程序并且我遇到了问题,如何通过照片框架更新照片的位置?我们有方法 finishContentEditingWithCompletionHandler

func finishContentEditingWithCompletionHandler(completionHandler: ((PHContentEditingOutput!) -> Void)!) {
    // Update UI to reflect that editing has finished and output is being rendered.

    // Render and provide output on a background queue.
    dispatch_async(dispatch_get_global_queue(CLong(DISPATCH_QUEUE_PRIORITY_DEFAULT), 0)) {
        // Create editing output from the editing input.
        let output = PHContentEditingOutput(contentEditingInput: self.input)

        // Provide new adjustments and render output to given location.
        // output.adjustmentData = <#new adjustment data#>
        // let renderedJPEGData = <#output JPEG#>
        // renderedJPEGData.writeToURL(output.renderedContentURL, atomically: true)

        // Call completion handler to commit edit to Photos.
        completionHandler?(output)

        // Clean up temporary files, etc.
    }
}

我们有 PHContentEditingOutput ,有没有办法改变位置?怎么做?提前谢谢。

0 个答案:

没有答案