You can do this by creating typealiasfor NSError, NSErrorRef. You will then refer to these message types in your class, as NSErrorit will now refer to a property, not a class.
public typealias NSErrorRef = NSError
public class MyClass {
public var NSError:NSErrorRef {
return NSErrorRef(domain: "", code: 0, userInfo: nil)
}
}
.
, , CGColor , Swift UIColor Objective-C. , - , . , UIColor, CGColor, CGColor ( Swift), , Apple , !
, ( ). :
public class MyClass {
public var nsError:NSError {
return NSError(domain: "", code: 0, userInfo: nil)
}
}
, , error - Swift ( ), ).
public class MyClass {
public var error:NSError {
return NSError(domain: "", code: 0, userInfo: nil)
}
}