Skip to content

Commit dc510c4

Browse files
authored
Merge pull request #1 from christiansheehan/master
Fix flipped tableviewcell bug
2 parents 4ac16a2 + f0eaf06 commit dc510c4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

MGSwipeTableCell/MGSwipeTableCell.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,13 +1026,21 @@ -(UIView *) hitTest:(CGPoint)point withEvent:(UIEvent *)event
10261026
#pragma mark Some utility methods
10271027

10281028
- (UIImage *)imageFromView:(UIView *)view cropSize:(CGSize)cropSize{
1029+
10291030
BOOL originalGeometry = view.layer.geometryFlipped;
1031+
BOOL superviewOriginalGeometry = view.superview.layer.geometryFlipped;
1032+
10301033
view.layer.geometryFlipped = NO;
1034+
view.superview.layer.geometryFlipped = NO;
1035+
10311036
UIGraphicsBeginImageContextWithOptions(cropSize, NO, 0);
10321037
[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];
10331038
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
10341039
UIGraphicsEndImageContext();
1040+
10351041
view.layer.geometryFlipped = originalGeometry;
1042+
view.superview.layer.geometryFlipped = superviewOriginalGeometry;
1043+
10361044
return image;
10371045
}
10381046

0 commit comments

Comments
 (0)