Has anyone figured out how to call CFNotificationCenterAddObserver() from Swift yet?
Session 224 had the following example:
CFNotificationCenterAddObserver(nc,
nil,
{ _ in self.reloadModel() },
"com.example.app-model-updated",
nil,
.DeliverImmediately)
However, I can't get this to compile. Xcode 6.4b4 gives the following error:
Cannot invoke 'CFNotificationCenterAddObserver' with an argument list of type '(CFNotificationCenter!, nil, (_) -> _, String, nil, CFNotificationSuspensionBehavior)'