Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Swift/CropViewController/CropViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,15 @@ open class CropViewController: UIViewController, TOCropViewControllerDelegate {
get { return toCropViewController.excludedActivityTypes }
}

/**
An array of `TOCropViewControllerAspectRatioPreset` enum values denoting which
aspect ratios the crop view controller may display (Default is nil. All are shown)
*/
public var allowedAspectRatios: [CropViewControllerAspectRatioPreset]? {
set { toCropViewController.allowedAspectRatios = newValue?.map { NSNumber(value: $0.rawValue) } }
get { return toCropViewController.allowedAspectRatios?.compactMap { CropViewControllerAspectRatioPreset(rawValue: $0.intValue) } }
}

/**
When the user hits cancel, or completes a
UIActivityViewController operation, this block will be called,
Expand Down