I have declared a action as
var postAction: Action<String, Data, NSError>!
now what i want is to trigger this action when the button triggers.
triggerBtn.reactive.pressed = CocoaAction(postAction)
But can't.How can i trigger some action when a button is pressed using reactive cocoa?
I have figured out a way to observe the actions.
self.testBtn.reactive.trigger(for: .touchUpInside).observe{ event in
//do something
print(event)
}
But cant figure out how to get the sender and bind Custom Action?