UIImage-PDF icon indicating copy to clipboard operation
UIImage-PDF copied to clipboard

Fix error when adding to Swift project

Open T-Pham opened this issue 8 years ago • 2 comments

The method - (UIImage *)image in the UIView+Image category causes an error in Swift projects. The error message is:

getter for 'image' with Objective-C selector 'image' conflicts with method 'image()' from superclass 'UIView' with the same Objective-C selector

Assignments to the image property of UIImageView in Swift with .image = will also get Cannot assign to property: 'self' is immutable error.

This pull request attempts to fix those errors.

T-Pham avatar May 26 '16 04:05 T-Pham

This PR works for me!

willeeklund avatar Nov 17 '16 08:11 willeeklund

Thanks T-Pham. I'm working on a Swift replacement. The WIP is at https://gist.github.com/mindbrix/bb1cb1d6260d024c08a3ae3fd79cf723

Does this suit your needs?

mindbrix avatar Nov 17 '16 09:11 mindbrix