AsyncImageView
AsyncImageView copied to clipboard
error: 'AsyncImageView' is ambiguous for type lookup in this context
When using AsyncImageView 1.5.1 and Spring https://github.com/MengTo/Spring, both as pods in a Swift project, the following compile-time error occurs:
error: 'AsyncImageView' is ambiguous for type lookup in this context @IBOutlet weak var myvariable:AsyncImageView! ^~~~~~~~~~~~~~ AsyncImageView.AsyncImageView:1:29: note: found this candidate @objc(AsyncImageView) class AsyncImageView : UIImageView ^ Spring.AsyncImageView:1:13: note: found this candidate @objc class AsyncImageView : UIImageView
The traditional tool to fix such problems is separate namespaces, but there are no namespaces.
Based on similar problem https://github.com/Haneke/HanekeSwift/issues/147 and instructions in https://github.com/raywenderlich/swift-style-guide#class-prefixes or http://stackoverflow.com/questions/24214863/swift-class-prefix-needed, I tried to prefix the type specification like this:
@IBOutlet weak var myvariable:AsyncImageView.AsyncImageView!
but it produced the exact same error message.
How to use both pods in a project ?