HHPanningTableViewCell
HHPanningTableViewCell copied to clipboard
cleanup: should not reset the direction mask
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 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.
Please create a pull request.