I have a convenience initializer in an extension inside my framework. And I want to use it in another extension in my project. It granted public access to everything I could but the compiler keeps saying "initializer is inaccessible due to 'internal' protection level"...
Here is my extension in framework:
public extension UIColor {
public convenience init(hex: Int) {
self.init(red:(hex >> 16) & 0xff, green:(hex >> 8) & 0xff, blue:hex & 0xff)
}
}
and here is my extension in my project:
import myFramework
extension UIColor {
class var backgroundGrey: UIColor {
return UIColor(hex: 0xe3e8eb)
}
}
The error is when I call UIColor(hex).
Do you know what's wrong here ?
Edit: I added the framework import