Skip to content

Commit 01cad64

Browse files
committed
Added layer.contents use for expansion button background
1 parent c35d197 commit 01cad64

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

MGSwipeTableCell/MGSwipeTableCell.m

+4
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ -(void) expandToOffset:(CGFloat) offset button:(NSInteger) index
138138
_expansionBackground = [[UIView alloc] initWithFrame:[self expansionBackgroundRect:_expandedButton]];
139139
_expansionBackground.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
140140
_expansionBackground.backgroundColor = _expandedButton.backgroundColor;
141+
if (UIColor.clearColor == _expandedButton.backgroundColor) {
142+
// Provides access to more complex content for display on the background
143+
_expansionBackground.layer.contents = _expandedButton.layer.contents;
144+
}
141145
[_container addSubview:_expansionBackground];
142146

143147
CGFloat duration = _fromLeft ? _cell.leftExpansion.animationDuration : _cell.rightExpansion.animationDuration;

0 commit comments

Comments
 (0)