Latest 1.0.3
Homepage https://github.com/itouch2/PhotoTweaks
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation, CoreGraphics, UIKit
Authors

PhotoTweaks

PhotoTweaks

PhotoTweaks is an interface to crop photos. It can let user drag, rotate, scale the image, and crop it. You will find it mimics the interaction of Photos.app on iOS 8. :]

Build Status
Pod Version
Platform
License

Usage

PhotoTweaksViewController offers all the operations to crop the photo, which includes translation, rotate and scale.

To use it,

UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
PhotoTweaksViewController *photoTweaksViewController = [[PhotoTweaksViewController alloc] initWithImage:image];
photoTweaksViewController.delegate = self;
photoTweaksViewController.autoSaveToLibray = YES;
photoTweaksViewController.maxRotationAngle = M_PI_4;
[picker pushViewController:photoTweaksViewController animated:YES];

maxRotationAngle is the property to set the maximum supported rotation angle.

Get the cropped image

- (void)photoTweaksController:(PhotoTweaksViewController *)controller didFinishWithCroppedImage:(UIImage *)croppedImage
{
    [controller.navigationController dismissViewControllerAnimated:YES completion:nil];
    // cropped image
}

Installation

PhotoTweaks is available on CocoaPods. Add the follwing to your Podfile:

pod 'PhotoTweaks', '~> 1.0.3'

Alternatively, you can manually drag the PhotoTweaks folder into your Xcode project.

A Quick Peek

screenshots

Protip

If using with an existing UIImagePickerController, be sure to set allowsEditing = NO otherwise you may force the user to crop with the native editing tool before showing PhotoTweaksViewController.

Latest podspec

{
    "name": "PhotoTweaks",
    "version": "1.0.3",
    "license": "MIT",
    "homepage": "https://github.com/itouch2/PhotoTweaks",
    "authors": {
        "Tu You": "[email protected]"
    },
    "summary": "Drag, Rotate, Scale and Crop.",
    "source": {
        "git": "https://github.com/itouch2/PhotoTweaks.git",
        "tag": "1.0.3"
    },
    "source_files": "PhotoTweaks/PhotoTweaks/*.{h,m}",
    "frameworks": [
        "Foundation",
        "CoreGraphics",
        "UIKit"
    ],
    "requires_arc": true,
    "platforms": {
        "ios": "7.0"
    }
}

Pin It on Pinterest

Share This