开发者

Data from FirstView

开发者_如何学Go

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜