I wanted to update the naming of the following method for Swift 3:
public func imageWithUrl(url: String, placeholderNamed: String) {
if let image = UIImage(named: placeholderNamed) {
imageWithUrl(url: url, placeholder: image)
} else {
imageWithUrl(url: url)
}
}
to
public func image(url: String, placeholderNamed: String) {
So I deprecated the old method with this:
@available(*, deprecated: 1.8, renamed: "image(url:, placeholder:")
The problem is that I'm getting the following error:
'renamed' argument of 'available' attribute must be an operator, identifier, or full function name, optionally prexied by a type name
I was having a problem with the renamed:
part. In order to fix that, just change it to
@available(*, deprecated: 1.8, renamed: "image(url:placeholder:)")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With