|
|
|
|
102
|
scrollView.frame = CGRectMake(0, 0, scrollView.contentSize.width, scrollView.contentSize.height);
|
102
|
scrollView.frame = CGRectMake(0, 0, scrollView.contentSize.width, scrollView.contentSize.height);
|
103
|
}
|
103
|
}
|
104
|
|
104
|
|
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);
|
114
|
|
106
|
|
115
|
success = [rendered drawViewHierarchyInRect:(CGRect){CGPointZero, size} afterScreenUpdates:YES];
|
107
|
success = [rendered drawViewHierarchyInRect:(CGRect){CGPointZero, size} afterScreenUpdates:YES];
|
116
|
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
|
108
|
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
|