xmartlabs / Eureka

Elegant iOS form builder in Swift
https://eurekacommunity.github.io
MIT License
11.77k stars 1.33k forks source link

What is the difference between cellUpdate and cellSetup? #2227

Closed Maxcucurbit closed 2 years ago

Maxcucurbit commented 2 years ago

What is the difference between cellUpdate and cellSetup? Why is it invalid to set cell.textLabel.textColor in cellSetup, but it works in cellUpdate.

mats-claassen commented 2 years ago

cellSetup is run once, after creating the cell. Some attributes like textColor might be reset after that for example to show highlighted status.

cellUpdate is called each time the cell is updated (aka tableView(cellForRowAt: indexpath) method)

You can see this in the README