Code in TableView Controller
if ([segue.identifier isEqualToString:@"showListFiles"]) {
NSIndexPath *ip = [self.tableView indexPathForSelectedRow];
if (ip.section == 0) {
NSDictionary *currentBill = [[_response objectForKey:@"facturas_pendientes"] objectAtIndex:ip.row];
DkBPaymentViewController *pvc = [[DkBPaymentViewController alloc] init];
pvc = (DkBPaymentViewController *) segue.destinationViewController;
pvc.setUp = currentBill;
}
else if(ip.section == 1){
DkBBillsFileTableViewController *ftvc = segue.destinationViewController;
ftvc.filesList = [[[_response objectForKey:@"facturas_pagadas"] objectAtIndex:ip.row] objectForKey:@"archivos_facturas"];
}
}
Error
-[DkBBillsFileTableViewController setSetUp:]: unrecognized selector sent to instance 0x85a3b00
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DkBBillsFileTableViewController setSetUp:]: unrecognized selector sent to instance 0x85a3b00'
How can you do or what is the best way to conditional segue to different view controllers based on the section of the section of the table (Section 1 To pay / Section 2 Paid) ?
Details
DkbPaymentViewController has it's own xib given that I can't make the prototype cell to point to two different
DkBBillsFileTableViewController is the original segue that I declared
Thank you so much in advance, I believe that to find a good method of conditional segue in a tableview would benefit all.