Ich habe wirklich Mühe, die neue Syntax für Beobachter zu verstehen.Hinzufügen von Observer und Selector in Swift 3
Können Sie mir helfen, dieses 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)
Vielen Dank an Swift zu übersetzen!