Skip to content

Commit c3eb5ad

Browse files
committed
Get rid of _cachedParentTable. Fixes issue CEWendel#294.
1 parent e8dd0ff commit c3eb5ad

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

MGSwipeTableCell/MGSwipeTableCell.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,6 @@ @implementation MGSwipeTableCell
564564

565565
MGSwipeTableInputOverlay * _tableInputOverlay;
566566
bool _overlayEnabled;
567-
__weak UITableView * _cachedParentTable;
568567
UITableViewCellSelectionStyle _previusSelectionStyle;
569568
NSMutableSet * _previusHiddenViews;
570569
BOOL _triggerStateChanges;
@@ -968,18 +967,14 @@ -(UIColor *) backgroundColorForSwipe
968967

969968
-(UITableView *) parentTable
970969
{
971-
if (_cachedParentTable) {
972-
return _cachedParentTable;
973-
}
974-
975970
UIView * view = self.superview;
976971
while(view != nil) {
977972
if([view isKindOfClass:[UITableView class]]) {
978-
_cachedParentTable = (UITableView*) view;
973+
return (UITableView*) view;
979974
}
980975
view = view.superview;
981976
}
982-
return _cachedParentTable;
977+
return nil;
983978
}
984979

985980
-(void) updateState: (MGSwipeState) newState;

0 commit comments

Comments
 (0)