Alex Alex - 8 months ago 54
iOS Question

Selected Index of UI Cell

I am new to iOS programming
I would like to Save the Selected

Cell (cell.detailTextLabel.text)
to another
outside of table view in the same
Can anyone suggest me how?


Use this delegate method of the table view,

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    selectedLabelName = cell.textLabel.text;

declare variable name selectedLabelName in your viewcontroller