UIAlertView *aaa = [[UIAlertView alloc] initWithTitle:@"提示" message:@"dadsads" delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:@"確定", nil];
[aaa.rac_buttonClickedSignal subscribeNext:^(id x) {
NSLog(@"%@",x);
}];
[aaa show];
關(guān)于recativecocoa 為什么可以實現(xiàn)點擊識別功能
api里面也就是這兩個方法
rac_buttonClickedSignal相當(dāng)與一個category內(nèi)部拷貝回調(diào)實現(xiàn)
- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock
subscriber->_next = [next copy]