Set dimensions for UIImagePickerController “move and scale” cropbox

前端 未结 4 1695
忘掉有多难
忘掉有多难 2020-11-28 04:20

How does the \"move and scale screen\" determine dimensions for its cropbox?

Basically I would like to set a fixed width and height for the \"CropRect\" and let the

4条回答
  •  不知归路
    2020-11-28 04:45

    Here is a solution for manual cropping by Ming Yang. https://github.com/myang-git/iOS-Image-Crop-View

    It offers a rectangular frame, which the user can slide or drag to fit the required portion of the image in the rectangle. Please note that this solution does the reverse of the question asked - lets the rectangle size vary, but eventually brings the desired result.

    It is coded in Objective-C. You may have to either code it in Swift or simply build a bridging header to connect the Objective-C code with Swift code.

提交回复
热议问题