Skip to content

Commit 476b446

Browse files
committed
Removed extraneous if check - assigning the scaling is not required
1 parent 8ca87ce commit 476b446

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

ios/RNViewShot.m

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,7 @@ - (dispatch_queue_t)methodQueue
102102
scrollView.frame = CGRectMake(0, 0, scrollView.contentSize.width, scrollView.contentSize.height);
103103
}
104104

105-
if ([target intValue] == -1) {
106-
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
107-
UIGraphicsBeginImageContextWithOptions(view.window.bounds.size, NO, [UIScreen mainScreen].scale);
108-
} else {
109-
UIGraphicsBeginImageContext(view.window.bounds.size);
110-
}
111-
} else {
112-
UIGraphicsBeginImageContextWithOptions(size, NO, 0);
113-
}
105+
UIGraphicsBeginImageContextWithOptions(size, NO, 0);
114106

115107
success = [rendered drawViewHierarchyInRect:(CGRect){CGPointZero, size} afterScreenUpdates:YES];
116108
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();

0 commit comments

Comments
 (0)