1

I'm trying to get the CocoaAction to invoke the Action. The CocoaAction is triggered but the Action is never executed. Can anyone see where I'm going wrong with this?

    let a = Action<Bool, Void, NoError> { val in
        return SignalProducer { sink, _ in
            print("I has a value: \(val)")
            sink.sendCompleted()
        }
    }

    self.cocoaAction = CocoaAction(a) { _ in
        return true
    }

    self.myButton.addTarget(self.cocoaAction, action: CocoaAction.selector, forControlEvents: .TouchUpInside)
Erik Johansson
  • 1,188
  • 1
  • 8
  • 22

1 Answers1

0

Turns out it something in Reactive Cocoa broken when moving from Swift 2.1 to Swift 2.2. Updated to the latest commit and now it works like a charm.

Erik Johansson
  • 1,188
  • 1
  • 8
  • 22