One of the features of my application is that it does automatic cropping of the image.
The main idea is that someone photographed a piece of paper (I think: a receipt), and then the image can be cropped automatically after the borders of the paper are determined.
I can determine the border of paper using OpenCV. So, the next thing I do is change the "center" property of each of my guides (there are only two horizontal and two vertical "lines" that you can drag manually).
Then, some time after I make all my calls to change each of the 4 manuals, something else appears and sets the “center” again. (I confirmed this with "setCenter" to prove it). The center seems to reset: [UIView (Geometry) _applyISEngineLayoutValues] .
I can’t understand why this is happening, or how to stop it, but this is probably due to limitations. My view is a simple UIButton. When the user clicks on it with a finger, the calling program is called, which simply changes the center. It works.
But in another case, I am raising a UIImagePickerController. After they have selected the image, I define the boundaries of the paper, change the "guide" centers, and then "_applyISEngineLayoutValues" returns them back.
Any idea what happens in this case? Or how can I set a presentation center and actually it will remain?
source share