【发布时间】:2013-07-24 22:14:55
【问题描述】:
TableView 控制器中的代码
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"];
}
}
错误
-[DkBBillsFileTableViewController setSetUp:]: unrecognized selector sent to instance 0x85a3b00
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DkBBillsFileTableViewController setSetUp:]: unrecognized selector sent to instance 0x85a3b00'
根据表格部分的部分(第 1 部分支付/第 2 部分已支付),您如何做或最好的方法是有条件地切换到不同的视图控制器?
详情
DkbPaymentViewController 有它自己的 xib,因为我无法让原型单元格指向两个不同的单元格
DkBBillsFileTableViewController 是我声明的原始 segue
在此先感谢您,我相信在 tableview 中找到一个好的条件 segue 方法将使所有人受益。
【问题讨论】:
-
为什么没有 2 个单元格和 2 个 segues,指向 2 个不同的视图控制器?
-
谢谢@wain,如果您添加您的答案,我很乐意接受。
标签: ios uitableview ios6 uistoryboardsegue