Skip to content

Commit

Permalink
Fix for Xcode 15
Browse files Browse the repository at this point in the history
  • Loading branch information
mieszko4 committed Dec 8, 2023
1 parent 9ab80fc commit 907c90f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ios/FastImage/FFFastImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ - (void) setImageColor: (UIColor*)imageColor {

- (UIImage*) makeImage: (UIImage*)image withTint: (UIColor*)color {
UIImage* newImage = [image imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate];
UIGraphicsBeginImageContextWithOptions(image.size, NO, newImage.scale);
[color set];
[newImage drawInRect: CGRectMake(0, 0, image.size.width, newImage.size.height)];
newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:image.size];
newImage = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
[color setFill];
[newImage drawInRect:CGRectMake(0, 0, image.size.width, newImage.size.height)];
}];
return newImage;
}

Expand Down

0 comments on commit 907c90f

Please sign in to comment.