Reputation: 11
So with a library that I have installed called 'KTSpectrum' I am calling an extension dominantColors on an image to return a UIColor object.
import KTSpectrum // this import the kMeans clustering library
@IBOutlet var tempImageView: UIImageView! // this hold a temporary image to be displayed in the view
let image = UIImage(CGImage: cgImageRef!, scale: 1.0, orientation: UIImageOrientation.Right)
self.tempImageView.image = image
self.tempImageView.hidden = false
let colors = self.tempImageView.image!.dominantColors()
// this gives me the error Value of type UIImage has no member dominantColors
I have linked the framework and built it within the project. Still not sure what the error is telling me.
Upvotes: 0
Views: 1434
Reputation: 229
Just copy the files directly into your Project:
and don't use CocoaPods. You don't have to use the "import KTSpectrum" row and everything will work fine, I just tried it myself.
Upvotes: 1