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
Just wanted to understand the reasoning behind defaulting to calling - (void)cleanupBackView after every cell pan animation / swipe completes.
For those reading this who aren't familiar with - (void)cleanupBackView, destroys and recreates the backView property (i.e. all your custom views need to be re-created).
I can see how it would be beneficial to get a fresh start in some cases but destroying and recreating the entire backView seems a bit over-kill to me in many situations. It also increases the complexity of the code (in your example, you create getters that check to see if the "check mark" or "X" image view had been destroyed).
I may add a property that disables this behavior unless there is something I'm not understanding.
The text was updated successfully, but these errors were encountered:
I added a delegate method to give users the option of specifying whether the backView needs to be recreated or not:
- (BOOL)swipeTableViewCellShouldCleanupBackView:(RMSwipeTableViewCell *)swipeTableViewCell
{
// Check the state of the cell... If things are out-dated or just in need of serious// cleanup we can return YES to have the backView re-created.// Otherwise, let's not do work we don't need to :)returnNO;
}
Just wanted to understand the reasoning behind defaulting to calling
- (void)cleanupBackView
after every cell pan animation / swipe completes.For those reading this who aren't familiar with
- (void)cleanupBackView
, destroys and recreates thebackView
property (i.e. all your custom views need to be re-created).I can see how it would be beneficial to get a fresh start in some cases but destroying and recreating the entire backView seems a bit over-kill to me in many situations. It also increases the complexity of the code (in your example, you create getters that check to see if the "check mark" or "X" image view had been destroyed).
I may add a property that disables this behavior unless there is something I'm not understanding.
The text was updated successfully, but these errors were encountered: