mercredi 24 juin 2015

Swift. Change Color of Custom Tableview Cell Label when selected

I have a Custom Tableview cell in swift and in that cell a label.

I want to be able to change the label when you select a cell.

How can a Reference my custom Tableview cell label in didSelectRowAtIndexPath

In Objective C to reference my custom cell in didSelectRowAtIndexPath I would use the following:

MPSurveyTableViewCell *cell = (MPSurveyTableViewCell *)[tableView

cellForRowAtIndexPath:indexPath]; cell.customLabel.TextColor = [UIColor redColor];

What must I do in swift to achieve the same result?

See more ..

Aucun commentaire:

Enregistrer un commentaire