我创建了一个自定义单元格并在其上放置按钮,按钮事件是这样的
[cell.BtnRequest addTarget:self action:@selector(didTapButton:) forControlEvents:UIControlEventTouchUpInside];
和 didtapbutton 代码是这样的
- (void)didTapButton:(id)sender {
WorkerDetailsVC *wvc=[self.storyboard instantiateViewControllerWithIdentifier:@"workerdetailsvc"];
NSIndexPath *indepath = [self.tblorderdata indexPathForCell:sender];
wvc.arrworkarrequest=[arrData objectAtIndex:indepath.row];
NSLog(@" arr send :%@", wvc.arrworkarrequest);
wvc.struserid = struserid;
[self.navigationController pushViewController:wvc animated:YES];
}
在下一页我得到了数组 arrworkarrequest 并且在加载所有下一页后它会显示这样的错误
2014-10-01 15:08:42.607 demo[2151:60b] -[__NSCFNumber length]: unrecognized selector sent to instance 0x911a860
2014-10-01 15:08:42.613 dmeo[2151:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber length]: unrecognized selector sent to instance 0x911a860'