CocoaPods trunk is moving to be read-only. Read more on the blog, there are 7 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Dec 2014 |
Maintained by Andy Molloy.
Provides yet another UI for cropping images in iOS. Similar to the UI crop UI in the built in Photos app, but without the auto-zooming behavior.
MIT License.
ASMCropImageViewController* controller = [[ASMCropImageViewController alloc] init];
controller.image = [UIImage imageNamed:@"IMG_7999.jpg"];
UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:controller];
[self presentViewController:navController animated:YES completion:NULL];By default, the crop frame is not constrained to any aspect ratio. You can change that without
controller.aspectRatio = CGSizeMake(9, 16);To go back to unconstrained, just set aspectRatio to CGSizeZero.
UIImage* croppedImage = [controller croppedImage];This can be called at any time after the view has been presented, and can be called as often as you'd like.
This is currently barely tested and has not been used in any production code. You have been warned!