Reputation: 297
I am trying to figure out a way to crop a UIImage
as it's done in Photoshop Express:
So basically you just touch and drag the corners to resize the rectangle, then you tap the check button and it crops the image. Now I have the crop part done -- I made a method that crops an image from a CGRect
but I am having problems with this resizable rect. Everything I have tried has not worked, and it's making me crazy, because I know it is probably just something easy. Has anyone ever done anything like this or know of an example on the web?
Upvotes: 1
Views: 1916
Reputation: 3502
Made a project that could be useful. Check it out:
https://github.com/noripcord/Crop
Upvotes: 0
Reputation: 2543
Here you have the source code for the custom control you are looking.
http://www.cocoacontrols.com/platforms/ios/controls/bjimagecropper
I recommend you to browse that webpage http://www.cocoacontrols.com, you will find tons of sample code, and most of it has an open license so you can use it in your own app.
Hope that helps!
Upvotes: 2