Lionel Yu
Lionel Yu

Reputation: 388

How do you edit the "Style" section of a table view prototype cell?

For the Swift table view prototype Cell, it allows you to set the style = "Right Detail", which allows two text fields, one on the left and one on the right.

The left text field can be accessed through the following code.

cell.textLabel?.text

But does anyone know how to access the right text field (aka "Detail"?)

Upvotes: 0

Views: 49

Answers (1)

SwiftCoder
SwiftCoder

Reputation: 71

cell.detailTextLabel?.text = "Your text"

Upvotes: 2

Related Questions