how I can do new init like a
Attention: I need init, not static func
extension UIImage {
convenience init?(named: String, in bundle: Bundle? = nil, compatibleWith collection: UITraitCollection? = nil, rendring: UIImageRenderingMode) {
self.init(named: named, in: bundle, compatibleWith: collection)
self = self.imageWithRenderingMode(rendring) // error
return
}
}
but I have error for it implementation
Error: Cannot assign to value: 'self' is immutable