7
我有一個實現UICollectionViewDelegate協議的類。rac_signalForSelector:需要空執行
我使用rac_signalForSelector:didSelectItemAtIndexPath:如果我在一個空的實現的CollectionView的離開
[self rac_signalForSelector:@selector(collectionView:didSelectItemAtIndexPath:)]
但它只火災:註冊選擇這樣這樣的:
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
// Empty
}
我嘗試與rac_signalForSelector:fromProtocol:以及沒有運氣。
我使用的是無功可可2.2.4
感謝, 的Mikkel
有一個不雅但可用的解決方法:將'nil'分配給委託,然後重新分配真正的委託對象,這會導致選擇器緩存失敗。如果在之前分配委託後使用'-rac_signalForSelector:'執行此操作。 –