# TOCropViewController: An iOS UIImage Cropper Modelled on the Photos Editor

> TOCropViewController is a UIViewController subclass for cropping and rotating UIImage objects on iOS 12 and above, with a Swift wrapper called CropViewController. It is a UI component, not an image processing library, and that distinction decides where it fits.

**TimOliver/TOCropViewController** — A view controller for iOS that allows users to crop portions of UIImage objects

- Repository: https://github.com/TimOliver/TOCropViewController
- Stars: 4,948 · Forks: 1,022
- Language: Objective-C
- License: MIT
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/timoliver-tocropviewcontroller

## The gap TOCropViewController fills between UIImage and a finished crop

UIKit gives you UIImage but no built-in editor. Cropping by hand means tracking a gesture-driven rectangle, converting it between view and image coordinate spaces, handling rotation, and then redrawing. TOCropViewController packages that entire interaction as a UIViewController subclass you present modally, so the cropped UIImage arrives through a delegate callback rather than through your own geometry code.

The stated audience is app developers who need profile picture editing or partial photo sharing. The README says the controller was designed with the iOS Photos app editor in mind, so the drag handles, grid overlay and rotation behaviour follow conventions users already know. That is the real value: not the cropping math, but a familiar interaction that you do not have to design or maintain.

It is a UI component first. If you have no screen to show, this is the wrong layer entirely.

## Delegate callbacks, cropping styles and the two parallel implementations

The data flow is deliberately narrow. You construct the controller with a UIImage, set a delegate, and present it. When the user confirms, the controller calls back with a new UIImage plus the crop rectangle and angle that produced it. The README's basic example shows the Objective-C method cropViewController:didCropToImage:withRect:angle: and its Swift equivalent.

A second callback path exists for circular crops. Passing the circular cropping style changes which delegate method fires: didCropToCircularImage in Swift, or the circular variant in Objective-C. That means the cropping style is not just a visual flag; it selects the contract you implement.

Cancellation is handled separately. The README compares the class to MFMailComposeViewController and states that the presenting controller is responsible for dismissing it, which you do by implementing the cancelled delegate method and calling dismiss there. If you skip that method, a cancelled crop leaves the modal on screen.

The repository ships two implementations side by side. Objective-C sources live under Objective-C/TOCropViewController and the Swift wrapper under Swift/CropViewController. The Swift class, named CropViewController, is described as completely encapsulating the Objective-C one. Both podspecs sit at the repository root, one per implementation, which is why the pod name you choose determines which language surface you get.

## Installing TOCropViewController with CocoaPods and presenting a first crop

For CocoaPods, the README gives two pod names and the choice depends on your language. Objective-C projects add the TOCropViewController pod; Swift projects add CropViewController instead.

```ruby
# Podfile
pod 'TOCropViewController'
```

Swift Package Manager is supported through a package dependency pointing at the repository URL, as shown in the README's Package.swift snippet. Carthage users add the same repository to a Cartfile and then import exactly one framework from Carthage/Build: TOCropViewController.framework for Objective-C, CropViewController.framework for Swift. The README is explicit that the two frameworks are separate and you do not import both.

Manual installation copies directories rather than linking a framework. Objective-C projects copy Objective-C/TOCropViewController into the Xcode project. Swift projects copy both that directory and Swift/CropViewController.

Once linked, a minimal Swift use looks like the README's basic example. Create the controller with an image, assign the delegate, present it, and implement the didCropToImage callback to receive the result.

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

After the user confirms, the delegate method fires with the cropped image, the crop rectangle and the rotation angle. For avatars, the README shows constructing the controller with the circular cropping style and implementing didCropToCircularImage instead. The sample apps in the repository are the reference for a complete flow, including the dismissal path.

## Where TOCropViewController stops being the right tool

The README's system requirements state iOS 12.0 or above. That is a floor, not a promise about newer platform modes. The same section carries a disclaimer that visionOS and Mac Catalyst modes are enabled but not officially supported, with pull requests welcome. Treat those targets as untested territory rather than supported configurations.

The class is a UIViewController subclass, so it needs a presentation context. There is no documented headless API for cropping a UIImage without showing the editor, which rules it out for background jobs, server-side pipelines or batch conversion. If you need to crop a hundred images on launch, this is the wrong layer.

The README also does not document a SwiftUI view. Swift developers get a Swift interface over the controller, not a declarative wrapper, so a SwiftUI app has to bridge the presentation itself. That gap is visible in the codebase split: two implementations, both built around UIKit presentation and delegates.

The circular style is a separate contract, not a post-processing step. If you build against the rectangular callback and later switch styles, you must change which delegate method you implement, or the result never arrives.

## TOCropViewController against RSKImageCropper and SwiftyCrop

The realistic alternatives are other iOS crop components, and the difference is mostly in how much of the Photos editor they reproduce. RSKImageCropper is the other long-standing Objective-C crop view controller in this space; the practical distinction is that TOCropViewController documents rotation in 90-degree segments, an aspect-ratio clamp, a reset button and a circular cropping style as built-in features, so the comparison comes down to which of those behaviours you need out of the box rather than which library crops a rectangle.

SwiftyCrop sits on the Swift side and is aimed at SwiftUI users. That is the sharper contrast: if your app is SwiftUI-first, a component designed around that model avoids the presentation bridging that TOCropViewController requires. If your app is UIKit, Objective-C or mixed, that advantage disappears and you are comparing feature lists instead.

Neither comparison is settled by the repository contents here. What the README does establish is the shape of the trade-off: TOCropViewController gives you a familiar, localized editor with a delegate contract, and asks in return that you present it modally and dismiss it yourself.

## Maintenance cadence, licence and what an upgrade actually costs

The repository is not archived. The last push was on 2026-07-28, and the most recent release, 3.2.0, is dated 2026-08-05, following 3.1.2 on 2026-04-07 and 3.1.1 on 2025-11-20. That is a steady release rhythm, and a CHANGELOG.md sits at the repository root, so the upgrade cost is discoverable rather than guesswork.

The practical cost of upgrading is small for most integrations because the public surface is a view controller plus delegate methods. The heavier cost is the initial integration choice: picking the Objective-C pod or the Swift wrapper determines which framework you import under Carthage and which pod name you write, and switching later means touching every call site. Decide that before you start.

The licence is MIT, which permits commercial use and modification. Read the LICENSE file at the repository root for the exact terms rather than relying on the badge in the README. This is a description of the licence, not legal advice.

## Conclusion

Adopt TOCropViewController when you need a modal, Photos-style crop and rotate screen for a UIImage and want the delegate to hand back the cropped result, with the circular style available for avatars. Do not adopt it for server-side cropping, for batch processing, or if you need a SwiftUI view that manages its own presentation, because the README documents neither a SwiftUI wrapper nor a headless API. Before committing, check the CHANGELOG entry for 3.2.0 against your deployment target and confirm whether you are integrating the Objective-C class directly or the CropViewController wrapper, since the two use different pod names and different frameworks under Carthage.

## FAQ

### What does TOCropViewController let the user do?

It presents a modal crop editor where the user drags the edges of a grid overlay to crop a UIImage, rotates the image in 90-degree segments, and can reset all changes with a reset button. The README also describes an optional circular cropping style and clamping the crop box to a specific aspect ratio.

### What does the crop tool look like on an iPhone?

The README says the controller was designed with the iOS Photos app editor in mind, so it behaves in a way that should already feel familiar to iOS users. Concretely, it presents a grid overlay whose edges are dragged to crop, with rotation in 90-degree segments and a reset button.

### What does a crop icon look like in TOCropViewController?

The README does not describe the iconography of the crop interface. It documents the interaction instead: dragging the edges of a grid overlay, rotating in 90-degree segments, and a reset button to undo all changes.

## Sources

- [Issues](https://github.com/TimOliver/TOCropViewController/issues)
- [License: MIT](https://github.com/TimOliver/TOCropViewController/blob/main/LICENSE)
- [README](https://github.com/TimOliver/TOCropViewController/blob/main/README.md)
- [Releases](https://github.com/TimOliver/TOCropViewController/releases)
- [TimOliver/TOCropViewController on GitHub](https://github.com/TimOliver/TOCropViewController)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/timoliver-tocropviewcontroller
