1
我真的很难理解观察者的新语法。在Swift中添加观察者和选择器3
你能不能帮我翻译这斯威夫特3.
nc.addObserver(self, selector: #selector(MapViewController.locationUpdated(_:)), name: LocationNotification.kLocationUpdated, object: nil)
nc.addObserver(self, selector: #selector(MapViewController.locationAuthorizationStatusChanged(_:)), name: LocationNotification.kAuthorizationStatusChanged, object: nil)
nc.addObserver(self, selector: #selector(MapViewController.locationManagerDidFailWithError(_:)), name: LocationNotification.kLocationManagerDidFailWithError, object: nil)
非常感谢!