Hey @AYastrebov, thanks for logging this issue.
This is a limitation for the project as a library like SwifterSwift extends such a large number of data types that it is possible for them to conflict with extensions provided in other 3rd party libraries.
Especially when an extension is a commonly used solution to a problem or revolves around a similar domain.
Here are my suggestions for you:
For example, if you only need SwifterSwift extensions relating to a single class
import class SwifterSwift.UIColor
This will allow you to use SwifterSwift extensions for UIColor while excluding the other types.
Unfortunately, if you need to rely on Date extensions provided to you in both DateTools and SwifterSwift -- I do not think there is a reasonable solution.
You could try:
var someDate: SwifterSwift.Date = Date()
To see if this resolves some of the ambiguity around the property/method access, but this is not ideal nor something I have tested myself.
Let me know if any of these solutions help and feel free to paste some code to see if we can both resolve this.
Hey @SD10
Thanks for quick response!
The easiest solution for me was just to take needed component from DateTools and integrate it directly to the project and remove the corresponding pod. So I suppose this can be closed. Thanks!
I had the same issue with this library: https://github.com/andreamazz/AMPopTip because they use shadowOffset, shadowRadius .... on UIView elements. I solve it the following way:
popTip.setValue(8, forKey: "cornerRadius")
popTip.setValue(70, forKey: "shadowRadius")
popTip.setValue(1, forKey: "shadowOpacity")
popTip.setValue(UIColor(red: 0, green: 0, blue: 0, alpha: 1.0), forKey: "shadowColor")
popTip.setValue(CGSize.zero, forKey: "shadowOffset")
Instead of accessing directly to the property.
Most helpful comment
I had the same issue with this library: https://github.com/andreamazz/AMPopTip because they use shadowOffset, shadowRadius .... on UIView elements. I solve it the following way:
Instead of accessing directly to the property.