Skip to content

Conversation

@Theome
Copy link
Contributor

@Theome Theome commented Sep 30, 2019

The initializer initWithCroppingStyle:image: calls a super initializer that is not a designated initializer. This leads to a crash on initialization of subclasses implemented in Swift that don't provide a custom init().

To reproduce the issue, create a subclass in Swift as follows:

class CropViewController: TOCropViewController {
  init(image: UIImage) {
    super.init(croppingStyle: .default, image: image)
  }
  /* ... */
}

A call to init(image:) will throw an exception.

The PR fixes this issue.

@TimOliver
Copy link
Owner

Ah! Sorry for the delay! I had no idea those kinds of Swift issues existed. Thanks so much for that!

I'm collecting all of the bugs people have reported so far and will try and ship a new release soon.

@TimOliver TimOliver merged commit 022ab93 into TimOliver:master Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants