A view controller for iOS that allows users to crop portions of UIImage objects

Overview

TOCropViewController

CI Version Carthage compatible GitHub license Platform

TOCropViewController is an open-source UIViewController subclass to crop out sections of UIImage objects, as well as perform basic rotations. It is excellent for things like editing profile pictures, or sharing parts of a photo online. It has been designed with the iOS Photos app editor in mind, and as such, behaves in a way that should already feel familiar to users of iOS.

For Swift developers, CropViewController is a Swift wrapper that completely encapsulates TOCropViewController and provides a much more native, Swiftier interface.

Proudly powering apps by

Looking for something more? If TOCropViewController doesn't meet your exact requirements, please consider IMG.LY with video editing and photo filter capabilities instead! (Disclaimer: Affiliate Link)

Features

  • Crop images by dragging the edges of a grid overlay.
  • Optionally, crop circular copies of images.
  • Rotate images in 90-degree segments.
  • Clamp the crop box to a specific aspect ratio.
  • A reset button to completely undo all changes.
  • iOS 7/8 translucency to make it easier to view the cropped region.
  • The choice of having the controller return the cropped image to a delegate, or immediately pass it to a UIActivityViewController.
  • A custom animation and layout when the device is rotated to landscape mode.
  • Custom 'opening' and 'dismissal' animations.
  • Localized in 28 languages.

System Requirements

iOS 8.0 or above

Installation

CocoaPods

Objective-C

Add the following to your Podfile:

pod 'TOCropViewController'

Swift

Add the following to your Podfile:

pod 'CropViewController'
Swift Package Manager

Add the following to your Package.swift:

dependencies: [
  // ...
  .package(url: "https://github.com/TimOliver/TOCropViewController.git"),
],
Carthage
  1. Add the following to your Cartfile:
github "TimOliver/TOCropViewController"
  1. Run carthage update

  2. From the Carthage/Build folder, import one of the two frameworks into your Xcode project. For Objective-C projects, import just TOCropViewController.framework and for Swift, import CropViewController.framework instead. Each framework is separate; you do not need to import both.

  3. Follow the remaining steps on Getting Started with Carthage to finish integrating the framework.

Manual Installation

All of the necessary source and resource files for TOCropViewController are in Objective-C/TOCropViewController, and all of the necessary Swift files are in Swift/CropViewController.

For Objective-C projects, copy just the TOCropViewController directory to your Xcode project. For Swift projects, copy both TOCropViewController and CropViewController to your project.

Examples

Using TOCropViewController is very straightforward. Simply create a new instance passing the UIImage object you wish to crop, and then present it modally on the screen.

While TOCropViewController prefers to be presented modally, it can also be pushed to a UINavigationController stack.

For a complete working example, check out the sample apps included in this repo.

Basic Implementation

Swift

func presentCropViewController() {
  let image: UIImage = ... //Load an image
  
  let cropViewController = CropViewController(image: image)
  cropViewController.delegate = self
  present(cropViewController, animated: true, completion: nil)
}

func cropViewController(_ cropViewController: CropViewController, didCropToImage image: UIImage, withRect cropRect: CGRect, angle: Int) {
        // 'image' is the newly cropped version of the original image
    }

Objective-C

- (void)presentCropViewController
{
  UIImage *image = ...; // Load an image
  
  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];
  cropViewController.delegate = self;
  [self presentViewController:cropViewController animated:YES completion:nil];
}

- (void)cropViewController:(TOCropViewController *)cropViewController didCropToImage:(UIImage *)image withRect:(CGRect)cropRect angle:(NSInteger)angle
{
  // 'image' is the newly cropped version of the original image
}

Similar to many UIKit UIViewController subclasses, like MFMailComposeViewController, the class responsible for presenting view controller should also take care of dismissing it upon cancellation. To dismiss TOCropViewController, implement the cropViewController:didFinishCancelled: delegate method, and call dismissViewController:animated: from there.

Making a Circular Cropped Image

Swift

func presentCropViewController() {
    var image: UIImage? // Load an image
    let cropViewController = CropViewController(croppingStyle: .circular, image: image)
    cropViewController.delegate = self
    self.present(cropViewController, animated: true, completion: nil)
}

func cropViewController(_ cropViewController: TOCropViewController?, didCropToCircularImage image: UIImage?, with cropRect: CGRect, angle: Int) {
    // 'image' is the newly cropped, circular version of the original image
}

Objective-C

- (void)presentCropViewController
{
UIImage *image = ...; // Load an image

TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithCroppingStyle:TOCropViewCroppingStyleCircular image:image];
cropViewController.delegate = self;
[self presentViewController:cropViewController animated:YES completion:nil];
}

- (void)cropViewController:(TOCropViewController *)cropViewController didCropToCircularImage:(UIImage *)image withRect:(CGRect)cropRect angle:(NSInteger)angle
{
// 'image' is the newly cropped, circular version of the original image
}
Sharing Cropped Images Via a Share Sheet

Swift

func presentCropViewController() {
    var image: UIImage? // Load an image
    let cropViewController = CropViewController(image: image)
    cropViewController.showActivitySheetOnDone = true
    self.present(cropViewController, animated: true, completion: nil)
}

Objective-C

- (void)presentCropViewController
{
  UIImage *image = ...; // Load an image
  
  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];
  cropViewController.showActivitySheetOnDone = YES;
  [self presentViewController:cropViewController animated:YES completion:nil];
}
Presenting With a Custom Animation

Optionally, TOCropViewController also supports a custom presentation animation where an already-visible copy of the image will zoom in to fill the screen.

Swift

func presentCropViewController() {
    var image: UIImage? // Load an image
    var imageView = UIImageView(image: image)
    var frame: CGRect = view.convert(imageView.frame, to: view)
    
    let cropViewController = CropViewController(image: image)
    cropViewController.delegate = self
    self.present(cropViewController, animated: true, completion: nil)
    cropViewController.presentAnimated(fromParentViewController: self, fromFrame: frame, completion: nil)
}

Objective-C

- (void)presentCropViewController
{
  UIImage *image = ...;
  UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
  CGRect frame = [self.view convertRect:imageView.frame toView:self.view];
  
  TOCropViewController *cropViewController = [[TOCropViewController alloc] initWithImage:image];
  cropViewController.delegate = self;
  [self presentViewController:cropViewController animated:YES completion:nil];
  [cropViewController presentAnimatedFromParentViewController:self fromFrame:frame completion:nil];
}

Architecture of TOCropViewController

While traditional cropping UI implementations will usually just have a dimming view with a square hole cut out of the middle, TOCropViewController goes about its implementation a little differently.

Since there are two views that are overlaid over the image (A dimming view and a translucency view), trying to cut a hole open in both of them would be rather complex. Instead, an image view is placed in a scroll view in the background, and a copy of the image view is placed on top, inside a container view that is clipped to the designated cropping size. The size and position of the foreground image is then made to match the background view, creating the illusion that there is a hole in the dimming views, and minimising the number of views onscreen.

Credits

TOCropViewController was originally created by Tim Oliver as a component for iComics, a comic reader app for iOS.

Thanks also goes to TOCropViewController's growing list of contributors!

iOS Device mockups used in the screenshot created by Pixeden.

License

TOCropViewController is licensed under the MIT License, please see the LICENSE file. analytics

Comments
  • Dismissing transition (iOS 13) problems

    Dismissing transition (iOS 13) problems

    I've encounter an issue when presenting the crop controller over a Navigation controller.

    When dismissing the crop controller, at the end of the transition the navigation controller view is being removed and not displayed... (happens in iPhone and iPad and only on iOS 13).

    not to mention that the navigation is still there and the UI is "stuck".

    bug 
    opened by uchiaTziki 23
  • Image Zoomed In with Circular Crop

    Image Zoomed In with Circular Crop

    • [x] I have read this issue template and provided all possible information.
    • [ ] I'm using CocoaPods and have run pod update before filing this issue.

    Please remove this section of the issue template before filing your issue.

    Thanks for considering filing an issue! Before proceeding, please consider the type of issue you're filing and make sure to supply the proper details needed for it! :)

    Please note that your issue may be closed without review if you do not supply the information that is requested here. Since this library is done as a side-project outside of work hours, please understand that a timely response cannot be guaranteed. ;)

    For CocoaPods Users

    Before filing a bug report, please make sure you are using the latest version of CocoaPods (gem install cocoapods), and the latest version of this library (pod repo update).

    Support for CocoaPods-related issues is not provided unless you confirm both of these points in your submission.

    Issue Types

    Questions: Please check the closed issues to see if it's already been asked before.

    Feature Request: Please fill in just the first two sections. Please be as thorough as possible and explain how you would expect this feature to work both visually, and from an API perspective.

    Bugs: Please be as thorough as possible when describe the bug you've discovered. If it's a visual bug, please add a screenshot. If it's an animation bug, please provide a recording of the bug in action.


    Hardware / Software

    Which version of the library were you using? Which version of iOS are you running? What model of iOS device were you testing on? If using CocoaPods, which version of CocoaPods are you on?

    Goals

    What is the outcome result you want to achieve with this library?

    Expected Results

    What did you expect to happen?

    Actual Results

    What happened instead? (Please attach a screenshot/screen recording if possible)

    Steps to Reproduce

    What are the steps needed to reproduce this issue? If this bug was caused by a specific image, please post it here.

    rfc 
    opened by inPhilly 16
  • "Generated duplicate UUIDs:" when installing via cocoapods

    Describe the bug After updating to version 2.5.4 I now receive "[!] [Xcodeproj] Generated duplicate UUIDs:" when installing the Pod followed by a huge dump of yellow text that points to all kinds of files. Xcode then warns with several instances of "Skipping duplicate build file in Copy Headers build phase: /project_dir/Pods/CropViewController/Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h" all pointing to files inside this pod.

    To Reproduce Install 2.5.4

    Expected behavior I expected no errors to occur.

    Downgrading to 2.5.3 fixes the problem so I'm pretty sure this pod and version is at fault.

    bug pr requested 
    opened by nickdnk 15
  • Is safeAreaInsets incorrect?

    Is safeAreaInsets incorrect?

    Thanks for the awesome library! 👍

    What are you trying to achieve with this library exactly? Please describe. I just have one question. The position of toolbar too close to the bottom: Has it an incorrect safeAreaInsets.bottom?

    Need a reproducible example project? TestSafeArea.zip

    bug rfc 
    opened by zhangao0086 14
  • Xcode 14 built error

    Xcode 14 built error

    "TOCropViewController-TOCropViewControllerBundle" requires a development team. Select a development team in the Signing & Capabilities editor.

    bug 
    opened by ygf-git 13
  • Image Movement very fast issue

    Image Movement very fast issue

    Hello, i used TOCropViewController to crop image,but when i cropping image, zoomin-zoomout (Movement) is very fast. image moved very fast. that issue occured in app.

    simulator screen shot 11-sep-2017 11 07 17 am

    bug rfc 
    opened by MVJadav 13
  • Getting this fail during build time ever since I updated to new xcode.

    Getting this fail during build time ever since I updated to new xcode.

    getting this error when running app, it fails during buildtime.

    /Users/USER/Library/Developer/Xcode/DerivedData/APPNAME-cqrknuczxqiiuxcvjlupnrmizjox/Build/Products/Debug-iphonesimulator/TOCropViewControllerBundle.bundle: bundle format unrecognized, invalid, or unsuitable
    Command /usr/bin/codesign failed with exit code 1
    

    Is it because there is a bundle within the cocoapods 'pods' folder?

    CodeSign /Users/USER/Library/Developer/Xcode/DerivedData/APPNAME-cqrknuczxqiiuxcvjlupnrmizjox/Build/Products/Debug-iphonesimulator/TOCropViewControllerBundle.bundle
        cd /Users/USER/APPNAME/Pods
        export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    
    Signing Identity:     "-"
    
        /usr/bin/codesign --force --sign - --timestamp=none /Users/USER/Library/Developer/Xcode/DerivedData/APPNAME-cqrknuczxqiiuxcvjlupnrmizjox/Build/Products/Debug-iphonesimulator/TOCropViewControllerBundle.bundle
    
    

    Also noticed this in the Pods Target screen shot 2016-11-02 at 10 36 28 am

    I'm up to date with 2.0.11

    question 
    opened by farhan-syed 13
  • Support iPhone X

    Support iPhone X

    Jumping in here before anyone else does.

    Due to the extremely custom layout of this view controller, it is hilariously broken on iPhone X.

    simulator screen shot - iphone x - 2017-09-13 at 15 14 53

    For the most part, it should just be a matter of making the tool bar and the crop box insets obey the safe area of iOS 11. It shouldn't be TOO bad to fix.

    bug in progress 
    opened by TimOliver 12
  • crashed in iPhone 6

    crashed in iPhone 6

    hi tim i have implemented your code .it was superrr.i have faced this issue in iphone 6 . Received memory warning. Communications error: <OS_xpc_error: <error: 0x19b382a80> { count = 1, contents = "XPCErrorDescription" => <string: 0x19b382e78> { length = 22, contents = "Connection interrupted" } }> Connection to assetsd was interrupted or assetsd died Terminating since there is no system app.

    opened by ArjunSa786 12
  • CropViewController.swift need to be updated for Swift 4.2

    CropViewController.swift need to be updated for Swift 4.2

    Apologies for the vague issue earlier.

    Change line 276:

    public var excludedActivityTypes: [UIActivity.ActivityType]? {

    to

    public var excludedActivityTypes: [UIActivityType]? {

    Change line 379:

    open override var childForStatusBarStyle: UIViewController?

    to

    open override var childViewControllerForStatusBarStyle: UIViewController? {

    Change line 387:

    open override var childForStatusBarHidden: UIViewController? {

    to

    open override var childViewControllerForStatusBarHidden: UIViewController? {

    Change line 445:

    override open var preferredScreenEdgesDeferringSystemGestures: UIRectEdge {
            if #available(iOS 11.0, *) {
                return toCropViewController.preferredScreenEdgesDeferringSystemGestures
            }
            
            return UIRectEdge.all
        }
    

    to

    override open func preferredScreenEdgesDeferringSystemGestures() -> UIRectEdge {
            if #available(iOS 11.0, *) {
                return toCropViewController.preferredScreenEdgesDeferringSystemGestures()
            }
            
            return UIRectEdge.all
        }
    

    Change line 549:

    extension CropViewController {
        fileprivate func setUpCropController() {
            addChild(toCropViewController)
            transitioningDelegate = (toCropViewController as! UIViewControllerTransitioningDelegate)
            toCropViewController.delegate = self
            toCropViewController.didMove(toParent: self)
        }
    

    to

    extension CropViewController {
        fileprivate func setUpCropController() {
            addChildViewController(toCropViewController)
            transitioningDelegate = (toCropViewController as! UIViewControllerTransitioningDelegate)
            toCropViewController.delegate = self
            toCropViewController.didMove(toParentViewController: self)
        }
    
    opened by ethanwa 10
  • "Retake" and "Use photo" buttons are not pressed

    I take a photo, then press "Use Photo" and "Cancel" button from TOCropViewController, then go back to the screen with the photo option. . Retake" and "Use photo" buttons are not pressed. private void CropPhoto(object sender, UIImagePickerMediaPickedEventArgs e) { var image = e.Info[UIImagePickerController.OriginalImage] as UIImage; var cropVC = new TOCropViewController(TOCropViewCroppingStyle.Circular, image); cropVC.Delegate = new CropDelegate(cropVC); _imagePicker.PresentViewController(cropVC, true, null); } kcms84lot5m

    question rfc 
    opened by antontereshko 9
  • Support UIModalPresentationStyle.overFullScreen

    Support UIModalPresentationStyle.overFullScreen

    Is your feature request related to a problem? Please describe.

    The framework currently requires UIModalPresentationStyle.fullScreen. However, can (and does) break some apps that use custom view controller presentation. We had to rework (and degrade) the navigation of our app to work with TOCropViewController.

    With UIModalPresentationStyle.fullScreen, UIKit removes the presenting view controller's view from the view hierarchy. On dismissal, UIKit reinstalls the presenting view controller's view. However, this process is not robust when the presenting view controller itself is presented using a custom presentation.

    In my specific case, we're using custom view controller presentation provided by SwiftMessages to display the presenting view controller. When TOCropViewController is dismissed, the presenting view controller's view is no longer visible because UIKit didn't properly restore the custom presentation's view hierarchy.

    Describe the solution you'd like

    Potential solutions in order of preference:

    1. Support all modal presentation styles
    2. Support UIModalPresentationStyle.overFullScreen
    3. Change from UIModalPresentationStyle.fullScreen to UIModalPresentationStyle.overFullScreen

    Describe alternatives you've considered

    We had to deviate from our app's navigation paradigm and use standard modal presentation with the flow that involves TOCropViewController.

    feature 
    opened by wtmoose 0
  • Use the recommended way to detect the current user device

    Use the recommended way to detect the current user device

    Hi,

    This PR changes to use the userInterfaceIdiom property of UIDevice directly to resolve the following warning:

    'UI_USER_INTERFACE_IDIOM' is deprecated: first deprecated in iOS 13.0 - Use -[UIDevice userInterfaceIdiom] directly.
    
    opened by woxtu 0
  • Add missing properties

    Add missing properties

    Hi,

    This PR adds the following missing properties to CropViewController:

    • minimumAspectRatio
    • customAspectRatioName
    • showCancelConfirmationDialog

    Resolve #525.

    opened by woxtu 0
  • Crop view freezes on iOS until the background image is loaded completely.

    Crop view freezes on iOS until the background image is loaded completely.

    Describe the bug I am using high-resolution images, which are pretty large in size, in my app. Images are shown in the photo-view (PhotoViewGallery.builder). Each image takes a few sec to be loaded If you try to pop the copper view before the image is completely loaded on screen: On Android, you don't see the image in cropper view, and the checkmark is indicating circular progress until the image is ready. -> which is UX-friendly! But on iOS, You immediately see the image in cropper view but the screen freezes, like a glitch, you need to hold on until the image is loaded. -> This is a bad experience for the user.

    Here is the function that I use for saving wallpaper and it pops up the cropper:

    Future<bool> saveWallpaperPortion(String myPath) async {
        var file = await DefaultCacheManager().getSingleFile(myPath);
        final croppedFile = await ImageCropper().cropImage(
          sourcePath: file.path,
          aspectRatio: CropAspectRatio(
              ratioY: SizeConfig.screenHeight, ratioX: SizeConfig.screenWidth),
          compressQuality: 100,
          uiSettings: [
            IOSUiSettings(
              rotateButtonsHidden: true,
              rotateClockwiseButtonHidden: true,
              aspectRatioLockEnabled: true,
            ),
          ],
        );
        try {
          if (croppedFile != null) {
            try {
              final result = await ImageGallerySaver.saveFile(croppedFile.path);
              return true;
            } catch (e) {
              return false;
            }
          } else {
            return false;
          }
        } catch (e) {
          return false;
        }
      }
    

    Expected behavior Getting the same behaviour as Android on iOS

    Screenshots If applicable, add screenshots to help explain your problem.

    iOS Device: iPhone 12 pro, iPhone 13pro, iPhone 14 pro

    Additional context How to work around this issue! I am about to release the app!

    bug 
    opened by ZahraVe 0
Releases(2.6.1)
  • 2.6.1(Jan 24, 2022)

    Fixed

    • Removed unneeded layout calculation. (#485)
    • Incorrect accessibility label for the 'Reset' button. (#487)
    • Improved Japanese localization. (#502)
    • Fixed an API typo in the Swift interface. (#504)
    • Fixed incorrect comment formatting producing HTML errors. (#507)
    Source code(tar.gz)
    Source code(zip)
  • 2.6.0(Dec 29, 2020)

    Added

    • Extremely basic support for Mac Catalyst, with an accompanying sample app. (#464)
    • Switched to using system SF Symbol icons on iOS 13.0 and up. (#455)
    • doneButtonColor and cancelButtonColor properties to control the color of the main call-to-action buttons in the toolbar. (#436)
    • showOnlyIcons property to disable showing the "Cancel" and "Done" text labels. (#438)
    • commitCurrentCrop() method to programmatically simulate tapping the 'Done' button. (#441)
    • Added Catalan localization. (#449)

    Fixed

    • Fixed an issue where visible snapping would occur during the presentation animation on iPad models with rounded corners. (#461)
    • Improved logic for detecting whether the controller needs to be popped or dismissed from its current presentation context. (#443)
    • Fixed a CocoaPods installation issue where warnings would be displayed about importing the header references needed for SPM support. (#445)
    • Added provisions for later versions of SPM no longer supporting iOS 8. (#448)
    • Added allowedAspectRatios property to Swift layer. (#453)

    Enhancements

    • Added back in resource support for SPM on Xcode 12. (#466)
    • Fixed a potential performance slow-down by replacing a custom mask, with standard CALAyer rounded corners for circular crops. (#462)
    • Rewrote how rotated regions of an image are extracted to not rely on Core Animation hackery. (#463)
    Source code(tar.gz)
    Source code(zip)
  • 2.5.5(Sep 30, 2020)

  • 2.5.4(Jul 20, 2020)

  • 2.5.3(Jun 11, 2020)

    Added

    • SPM Support. (#413)
    • The ability to explicitly show and hide the 'Cancel' and 'Done' buttons in the toolbar. (#392)

    Fixed

    • A memory crash caused by improper self usage in delegates between multiple instances of the Swift crop view controller. (#409)
    Source code(tar.gz)
    Source code(zip)
  • 2.5.2(Oct 22, 2019)

    Added

    • Brazilian Portuguese Language Support (#380)

    Fixed

    • A visual glitch that would occur in iOS 13 because the Swift view controller wasn't explicitly marked as full screen. (#385)
    • A visual glitch where the image would snap upwards during the presentation animation on non-Face ID devices. (#387)
    • A bug where subclassing the class in Swift would fail because it wasn't using the desginated initializer. (#379)
    Source code(tar.gz)
    Source code(zip)
  • 2.5.1(Jul 7, 2019)

    Added

    • Finnish Language Support (#360)

    Enhancements

    • Improved the UX of the cancellation dialog by changing the buttons from affirmative actions to explicit actions. (#362)

    Fixed

    • A crash that would occur if the cancellation confirmation dialog was attempted to be displayed on iPad. (#362)
    Source code(tar.gz)
    Source code(zip)
  • 2.5.0(Apr 21, 2019)

    Added

    • Swift 5.0 Support (#343)
    • Persian Language Support (#337)
    • Added customAspectRatioName property to expose the custom aspect ratio as a selectable choice (#344)

    Fixed

    • Made delegate in CropViewController weak. (#338)
    Source code(tar.gz)
    Source code(zip)
  • 2.4.0(Mar 19, 2019)

    Added

    • Swift 4.2 Support
    • Romanian and Hungarian localizations
    • The ability to show only certain aspect ratios
    • A setting to allow confirmation before cancelling a crop

    Fixed

    • Fixed layout issue on the new iPad Pro
    • Fixed issues with the aspect ratio settings when zooming out
    • Fixed an issue when rotating images would sometimes break
    • A bug where the completion handler of the cropping operation wouldn't fire

    Removed

    • iOS 7 Support
    Source code(tar.gz)
    Source code(zip)
  • 2.3.7(Jul 24, 2018)

    Added

    • minimumAspectRatio to set a minimum shape that the cropping box can be scaled to.
    • cropViewPadding to specifically control how much padding from the edge the crop box gives.
    • cropAdjustingDelay to specifically control how long the timer waits until animating the crop transition.
    • aspectRatioLockDimensionSwapEnabled as a stopgap to locking the aspect ratio when rotating the image.

    Fixed

    • More thorough sanitation of the final frame calculation.
    • A bug where sometimes the square aspect ratio would stop being square.
    • A memory cycle leak in the Swift wrapper.
    • A broken animation when rotating the device orientation 180 degrees.
    • A broken animation if you hit 'reset' right after resizing the crop box.
    • Danish and Malaysian localisations weren't being imported properly.
    Source code(tar.gz)
    Source code(zip)
  • 2.2(Nov 16, 2017)

    Added

    • Support for iPhone X.

    Changed

    • Fixed missing semicolons in iOS 7 code brace.
    • Fixed minor issue with certain nullable properties being marked as nonnull.
    • Made the clockwise rotation button visible by default.

    Fixed

    • Broken rotation animations in iOS 11.
    • Incorrect inset of crop content when status bar is visible.
    • General cleanup of the codebase
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Sep 7, 2017)

    2.1.0 - 2017-09-07

    Added

    • Added a CHANGELOG. (Yay!)
    • TOCropViewController.title property will display a title label above the crop view box.
    • Added more thorough checks to ensure both all delegate and completion block handlers execute in the right order.

    Changed

    • Fixed scroll view insets to work properly with new iOS 11 assumptions.
    • Fixed crop box frame resizing to properly clamp when it touches an outer boundary.
    Source code(tar.gz)
    Source code(zip)
Owner
Tim Oliver
Gamer. Developer. Geek. Senior Software Engineer at @Drivemode (prev. @Realm). Lover of writing iOS code and singer of bad karaoke. 日本語もオッケ〜
Tim Oliver
Simple UIView to interact with an Image view like scroll, zoom, pinch and crop.

Welcome to Interactive Image View, a simple library that provides an easier way to interact with image view, like scroll, zoom and crop. In its core i

Egzon Pllana 23 Nov 7, 2022
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.

ImageDetect ImageDetect is a library developed on Swift. With ImageDetect you can easily detect and crop faces, texts or barcodes in your image with i

Arthur Sahakyan 299 Dec 17, 2022
Image picker with custom crop rect for iOS written in Swift (Ported over from GKImagePicker)

WDImagePicker Ever wanted a custom crop area for the UIImagePickerController? Now you can have it with WDImagePicker. Just set your custom crop area a

Wu Di 96 Dec 19, 2022
Crop faces, inside of your image, with iOS 11 Vision api.

FaceCropper Requirements Xcode 9.0 (beta) or higher. iOS 11.0 (beta) or higher. (It is possible to import this library under the iOS 11. But it won't

Taejun Kim 488 Dec 17, 2022
Simple image crop library for iOS

PhotoCropper This is a simple image crop library for iOS I made for fun on Chris

Aaron Lee 5 Jun 21, 2022
ZImageCropper is a simplest way to crop image to any shapes you like.

ZImageCropper ZImageCropper is a simplest way to crop image to any shapes you like. Example To run the example project, clone the repo, and run pod in

Mohammad Zaid Pathan 219 Dec 17, 2022
Autocrop - A face-aware crop utility using OSX's Vision framework

autocrop A high-performance face-aware crop utility using OSX's Vision framework

Alex Dong 0 Jan 19, 2022
A crop, compression, resize and trimming library for videos, based on AVKit.

VideoKit VideoKit is a high level layer on top of AVKit How it works // With this config, the video will get resized to 1920x1080p, the maximal length

Knoggl 9 Dec 24, 2022
IOS UIImage processing functions using the vDSP/Accellerate framework for speed.

UIImage Image Processing extensions using the vDSP/Accelerate framework.

null 372 Sep 1, 2022
SwiftGif - A small UIImage extension with gif support.

SwiftGif - A small UIImage extension with gif support.

SwiftGif 1.3k Dec 20, 2022
Convert UIImage to ASCII art

BKAsciiImage As seen on Cmd.fm iOS App https://itunes.apple.com/app/cmd.fm-radio-for-geeks-hackers/id935765356 Installation BKAsciiImage is available

Barış Koç 427 Dec 17, 2022
An NSFW image detector for Swift built as an extension on UIImage.

Swift_NSFW_Detector An NSFW image detector for Swift built as an extension on UIImage. If you've ever allowed users to share images you are probably w

Chris Brown 5 Nov 27, 2022
FlaneurImagePicker is an iOS image picker that allows users to pick images from different sources (ex: user's library, user's camera, Instagram...). It's highly customizable.

FlaneurImagePicker is a highly customizable iOS image picker that allows users to pick images from different sources (ex: device's library, device's c

FlaneurApp 17 Feb 2, 2020
Detecting Objects in Still Images

Detecting Objects in Still Images Locate and demarcate rectangles, faces, barcodes, and text in images using the Vision framework. Overview The Vision

우형준 1 Dec 9, 2021
TripUp is an open source, photo storage and sharing app made for privacy conscious users.

TripUp is an open source, photo storage and sharing app made for privacy conscious users.

TripUp 19 Aug 26, 2022
AnylineFaceAuthentication pairs identity document scanning with a real-time liveness check utilizing the iPhone's camera, best suited for authenticating users over the internet.

AnylineFaceAuthentication AnylineFaceAuthentication pairs identity document scanning with a real-time liveness check utilizing the iPhone's camera, be

null 0 Mar 7, 2022
Microblog-ref-app - A Twitter like social media app that users can share their moments

HiPlace - iOS Table of Contents Introduction HMS Services Getting Started Suppor

null 2 Jan 3, 2022
Linearmouse - For macOS mouse users

LinearMouse Reverse scrolling, Linear scrolling, Universal back & forward Cursor

LinearMouse 1.6k Jan 3, 2023