I want to create a class that adopts to NSURLSessionDownloadDelegate
protocol
what i did is:
class imageDelegate: NSURLSessionDownloadDelegate {
}
that is easy and it is fine. but i wanted to add one of it s method. i did this:
class imageDelegate: NSURLSessionDownloadDelegate {
@objc func URLSession(session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didFinishDownloadingToURL location: NSURL) {
print("asdfasf")
}
}
then i got error:
Type 'imageDelegate' does not conform to protocol 'NSObjectProtocol'
any idea how to solve that please?