Data from FirstView
I have no idea how to do this. I have a tableview on firstview with some labels. And they have a disclosure button I want to obtain the data from the labels and show them in secondview in other labels.
How to do it please?
Thank you
To get the selected cell you have to implement:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
YourCellType *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath];
}
YourCellType is an UITableViewCell subclass having the desired parameters (UILabel, UIImageView, etc.).
So if you have a UILabel *label1 in cell, you can access it by:
cell.label1
Hope this helps
精彩评论