I have a beginner's question regarding the ReactiveCocoa.
I want to return the value of shouldPerformSegueWithIdentifier
method based on user interaction with UIAlertView
.
That's what I have so far, obviously it doesn't work. How should I proceed?
-(BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender{
if([identifier isEqualToString:ModalBrowser]){
if(self.delegate.currentCoreConversation!=nil){
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"Disconnect?" message:@"This action will disconnect you from your current conversation. Would you like to continue?" delegate:self cancelButtonTitle:@"Heck No Techno!" otherButtonTitles:@"Certainly", nil];
[alertView show];
[alertView.rac_buttonClickedSignal subscribeNext:^(NSNumber *x) {
// return [x isEqual:@1];
}];
[alertView.rac_buttonClickedSignal subscribeNext:^(NSNumber *x) {
// return [x isEqual:@1];
}];
}
}
return YES;
}