Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensured explict fullscreen handling of Swift controller #385

Merged
merged 2 commits into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ x.y.z Release Notes (yyyy-MM-dd)

* Brazilian Portuguese Language Support ([#380](https://github.com/TimOliver/TOCropViewController/issues/380))

## Fixed

* A visual glitch that would occur in iOS 13 because the Swift view controller wasn't explicitly marked as full screen.

2.5.1 Release Notes (2019-07-08)
=============================================================

Expand Down
1 change: 1 addition & 0 deletions Swift/CropViewController/CropViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ open class CropViewController: UIViewController, TOCropViewControllerDelegate {

extension CropViewController {
fileprivate func setUpCropController() {
modalPresentationStyle = .fullScreen
addChild(toCropViewController)
transitioningDelegate = (toCropViewController as! UIViewControllerTransitioningDelegate)
toCropViewController.delegate = self
Expand Down
2 changes: 1 addition & 1 deletion Swift/CropViewControllerExample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ViewController: UIViewController, CropViewControllerDelegate, UIImagePicke
guard let image = (info[UIImagePickerController.InfoKey.originalImage] as? UIImage) else { return }

let cropController = CropViewController(croppingStyle: croppingStyle, image: image)
cropController.modalPresentationStyle = .fullScreen
//cropController.modalPresentationStyle = .fullScreen
cropController.delegate = self

// Uncomment this if you wish to provide extra instructions via a title label
Expand Down