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

Fix error when adding to Swift project #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

T-Pham
Copy link

@T-Pham T-Pham commented May 26, 2016

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.

Error message:
getter for 'image' with Objective-C selector 'image' conflicts with method 'image()' from superclass 'UIView' with the same Objective-C selector
@willeeklund
Copy link

This PR works for me!

@mindbrix
Copy link
Owner

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?

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.

3 participants