有人可以解释一下我在下面的代码中做错了什么吗?我尝试从该didSelectRowAtIndexPath
方法传递数据,但在SizeViewController中productKey 的值仍然为 null
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
SizeViewController *sizeViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"SizeView"];
sizeViewController.title = [self.choosedProducts objectAtIndex:indexPath.row];
sizeViewController.productKey = [self.choosedProductsIds objectAtIndex:indexPath.row];
[[self navigationController]pushViewController:sizeViewController animated:YES];
}