I have a bunch of UICollectionViewCells
containing buttons. For some reason, my signal refuses to fire when a button is inside of a UICollectionViewCell
. Switching to the normal addTarget:action:forControlEvents:
will work, but not the RAC signal. I've had this happen in 2 different collection views, and 2 different custom collection cells.
All I'm doing is:
[[cell.button rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
// code to be executed here, which doesn't happen
}];
What am I missing?
try:
[[[cell.button rac_signalForControlEvents:UIControlEventTouchUpInside]
takeUntil:cell.rac_prepareForReuseSignal]
subscribeNext:^(id x) {
// code to be executed here, which doesn't happen
}];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With