The following code gives me an Extra argument 'userinfo' in call
error. I've looked at the suggestions from @27620493 and 27875005
class SOViewController : UIViewController {
var currentLocation : CLLocation!
func setCurrentLocation(currentLocation: CLLocation) {
if (self.currentLocation == currentLocation) {
return
}
self.currentLocation = currentLocation
dispatch_async(dispatch_get_main_queue(), NSNotificationCenter.defaultCenter().postNotificationName(aName: SOCurrentLocationDidChangeNotification, object: nil, userInfo: ["kSOLocationKey" : currentLocation]))
}
I'm not sure why I'm getting this error considering currentLocation
is optional.