次のコードでExtra argument 'userinfo' in call
エラーが発生します。@ 27620493と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]))
}
currentLocation
オプションであると考えると、なぜこのエラーが発生するのかわかりません。