I want to manage all location code in one of my Proxy classes. As the class is built from scratch and not built on a UIView
or similar class that inherits NSObjectProtocol
, it throws an error 'Does not conform to protocol NSObjectProtocol
when I am trying to add CLLocationManagerDelegate
.
class GeoProxy : Proxy, CLLocationManagerDelegate
{
var locationManager = CLLocationManager()
override class var NAME: String { return "GeoProxy" }
}
Any idea, how I get the class to conform without adding all NSObjectProtocol
functions?
Easier way is making Proxy
class inherit from NSObject
:
class Proxy: NSObject {
}
Then, all subclasses will conform to NSObjectProtocol
. In addition, these classes will be compatible with Objective-C code.
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