You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the cleanup: method, the cell's directionMask is set to 0. cleanup: gets called for prepareForReuse as well as dealloc, so you are wiping out a user set value.
The text was updated successfully, but these errors were encountered:
The idea is to set directionMask in -tableView:cellForRowAtIndexPath:
You may want a different value for different rows. In that case it makes no sense to save directionMask across reuse.
I am guessing you want to set directionMask in a subclass rather than setting it on dequeue.
In that case you would need to set it both in the initialized and in prepareForReuse.
All things considered, I see no harm in not clearing directionMask in prepareForReuse. Callers setting a different value for each row on dequeue would overwrite the reused value just the same as the default value.
In the cleanup: method, the cell's directionMask is set to 0. cleanup: gets called for prepareForReuse as well as dealloc, so you are wiping out a user set value.
The text was updated successfully, but these errors were encountered: