0

次のコードでExtra argument 'userinfo' in callエラーが発生します。@ 2762049327875005からの提案を見てきました

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]))


}

currentLocationオプションであると考えると、なぜこのエラーが発生するのかわかりません。

4

1 に答える 1