Reputation: 51
I have a tableView with custom Cell and text in a label for each cell
When i'm selecting a cell i'm highlighting this cell with another color and saving it in a variable so that when i'm using my "next" button, i'm going to another view with the last selected cell value
My problem is that the variable is retrieving the name of the label and not the text i assigned to it ..
Upvotes: 1
Views: 40
Reputation: 171
You can just do it like this in your func tableView(UITableView, didSelectRowAt: IndexPath).
selectedCellText = careerSource[indexPath.row]
Upvotes: 2