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 為什么可以實(shí)現(xiàn)點(diǎn)擊識(shí)別功能
api里面也就是這兩個(gè)方法
rac_buttonClickedSignal相當(dāng)與一個(gè)category內(nèi)部拷貝回調(diào)實(shí)現(xiàn)
- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock
subscriber->_next = [next copy]