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

UIView extension causes ambiguity due to name collision. #845

Closed
OrkhanAlikhanov opened this issue Aug 25, 2017 · 5 comments
Closed

UIView extension causes ambiguity due to name collision. #845

OrkhanAlikhanov opened this issue Aug 25, 2017 · 5 comments

Comments

@OrkhanAlikhanov
Copy link
Contributor

Importing a framework in swift results in importing all public extensions from that framework. Material offers UIView.borderWidth extension which causes ambiguity for the compiler when I try to use PopTip.borderWidth. According to this answer and its comments it is impossible to resolve. I tried subclassing and overriding the borderWidth assuming that compiler will recognize what I am overriding, yet again failed. As the final way out I am using NSObject.setValue(, forKey) method. It works but I am not sure about its behavior.

popTip.setValue(0.5, forKey: "borderWidth")
@daniel-jonathan
Copy link
Member

Let's discuss this in Material Gitter as there isn't an issue here. There is a conflict because of two libraries.

@OrkhanAlikhanov
Copy link
Contributor Author

Well, actually I opened an issue here so that when someone encounteres the same problem, he/she can search for and find a way out.

@daniel-jonathan
Copy link
Member

Yes, that is a great reason. So in that case, let's leave a fix for this. I was hoping to discuss what should be done when this situation arises? As it will probably again on another property.

@AtherSajjad
Copy link

Cannot override mutable property 'borderColor' of type 'UIColor?' with covariant type 'UIColor'
Same issues it is complaining it is trying to override borderColor in Material Framework

@OrkhanAlikhanov
Copy link
Contributor Author

@AtherSajjad When did that happen? Let's discuss this at CosmicMind/Material gitter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants