sending text to label and number to int from tabelview to viewcontroller but it is not working
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
pushnavViewController *detailViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"pushnavViewController"];
[self.navigationController pushViewController:detailViewController animated:YES];
detailViewController.pushh.text = [IDNum objectAtIndex:indexPath.row];
detailViewController.pushh.text = [listt objectAtIndex:indexPath.row];
}
I also tried to do that , but not working :
detailViewController.pushh.text = [IDNum objectAtIndex:indexPath.row];
detailViewController.pushh.text = [listt objectAtIndex:indexPath.row];
[self.navigationController pushViewController:detailViewController animated:YES];
i made all the property and synthesize them :
@property (nonatomic) UILabel *pushh;
@property (nonatomic) UILabel *IDnumber;
so, any idea?
NSArray *listt,*IDNum;
detailViewController.pushh.textfor both assignments. Should bedetailViewController.IDnumber.textfor the first one, I believe. Secondly, you can't change the .text property of the label until after the view is loaded.IDNumandlistt. Thanks.