xmartlabs / XLForm

XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C.
MIT License
5.77k stars 953 forks source link

What is the difference between cellConfig and cellConfigAtConfigure? #974

Open EdwinCXD opened 7 years ago

EdwinCXD commented 7 years ago

for example It seems that the two are the same effect [row.cellConfig setObject:[UIColor redColor] forKey:@"backgroundColor"]; [row.cellConfigAtConfigure setObject:[UIColor purpleColor] forKey:@"backgroundColor"];

AlexHedley commented 7 years ago

https://github.com/xmartlabs/XLForm#additional-configuration-of-rows

You just have to add the properties to cellConfig or cellConfigAtConfigure dictionary property of XLFormRowDescriptor. The main difference between cellConfig and cellConfigAtConfigure is the time when the property is set up. cellConfig properties are set up each time a cell is about to be displayed. cellConfigAtConfigure, on the other hand, set up the property just after the init method of the cell is called and only one time.