Initializer does not override a designated initializer while subclassing NSURLSession Swift
问题 I want to subclass NSURLSession class, but I have problem with initialisation. Basically I override the constructor and initialising the constant authUrl there then calling the parent init method. class NSURLAuthSession: NSURLSession { let authUrl:NSURL; //Error: Initializer does not override a designated initializer from its superclass override init(configuration: NSURLSessionConfiguration, delegate: NSURLSessionDelegate?, delegateQueue queue: NSOperationQueue?){ self.authUrl = NSURL