Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed typeo in UIImage category

  • Loading branch information...
commit 9beaa2a791d622303270ef987de2753d88b89e28 1 parent 7e1d5a0
@soffes soffes authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 SSToolkit/UIImage+SSToolkitAdditions.m
View
6 SSToolkit/UIImage+SSToolkitAdditions.m
@@ -23,11 +23,11 @@ + (UIImage *)imageNamed:(NSString *)imageName bundleName:(NSString *)bundleName
- (UIImage *)imageCroppedToRect:(CGRect)rect {
- // CGImageCreateWithImageInRect's rect parameter is in pixels of the image's coordinates system. Convert to points.
+ // CGImageCreateWithImageInRect's `rect` parameter is in pixels of the image's coordinates system. Convert from points.
CGFloat scale = self.scale;
- rect = CGRectMake(rect.origin.x *scale, rect.origin.y * scale, rect.size.width * scale, rect.size.height * scale);
+ rect = CGRectMake(rect.origin.x * scale, rect.origin.y * scale, rect.size.width * scale, rect.size.height * scale);
- CGImageRef imageRef = CGImageCreateWithImageInRect([self CGImage], rect);
+ CGImageRef imageRef = CGImageCreateWithImageInRect(self.CGImage, rect);
UIImage *cropped = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);
return cropped;
Please sign in to comment.
Something went wrong with that request. Please try again.