Skip to content

Commit

Permalink
Fix issue MortimerGoro#113: Bug when changing the orientation of the …
Browse files Browse the repository at this point in the history
…device
  • Loading branch information
MortimerGoro committed Jul 14, 2015
1 parent 8a3edc9 commit 406acc7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MGSwipeTableCell/MGSwipeTableCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,12 @@ -(void) layoutSubviews
_swipeContentView.frame = self.contentView.bounds;
}
if (_swipeOverlay) {
CGSize prevSize = _swipeView.bounds.size;
_swipeOverlay.frame = CGRectMake(0, 0, self.bounds.size.width, self.contentView.bounds.size.height);
if (_swipeView.image && !CGSizeEqualToSize(prevSize, _swipeOverlay.bounds.size)) {
//refresh contentView in situations like layout change, orientation chage, table resize, etc.
[self refreshContentView];
}
}
}

Expand Down

0 comments on commit 406acc7

Please sign in to comment.