Search code examples
iosswiftimagecropedges

Crop image in SWIFT-IOS with movable edge points


I am working in a project that use images. I want to crop image with movables edges. (I mean that the user can crop image in a square figure but not only that, in any other figure that join the points too, like the image of the link shows)

I search a lot and after that i found this: Libreria

This is exacly what i am looking for but it's in objective C. Some one know a library in swift to simplify the task? (Or a portion of code maybe)?

Thanks a lot!!

Joaquin


Solution

  • JBCroppableView is coded in Objective-C. If you want the solution to work in Swift language, you will have to either code it in Swift or prepare a bridging header file to connect Objective-C with Swift. That is not so hard I guess.

    One more library which can help you is DuncanMC's CropImg which is in Swift.

    https://github.com/DuncanMC/CropImg