swift - How can I store a cell height value in a Realm object that is associated with the cell? -


i using realm swift on ios store objects associated uitableviewcell. each cell of dynamic height, , store height information in realm object well. unfortunately, cannot put code update cell height information in notification block of realm object since trigger infinite loop. tried adding class creates sort of foreign key relationship base object , somehow triggered infinite loop try update other object in notification block.

what best way out problem?

much cocoa's key value observing, realm's notifications indicate object modified if set properties on object, if set properties existing values. triggering notification loop. avoid this, can check within notification block whether you're setting cell height property same value object has. if so, skip updating property.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -