Skip to content

Commit

Permalink
fix docs and formatting from PR jessesquires#105
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Dec 24, 2013
1 parent 6a58149 commit 9b7e725
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ extern CGFloat const kJSAvatarImageSize;
croppedToCircle:(BOOL)croppedToCircle;

/**
* Returns the image object associated with the specified image. The image is cropped to a circle if the value of croppedToCircle is `YES`, otherwise the image is cropped to a square. The image has a flat, iOS 7 appearance.
* Returns a copy of the image object associated with the specified originalImage. The image is cropped to a circle if the value of croppedToCircle is `YES`, otherwise the image is cropped to a square. The image has a flat, iOS 7 appearance.
*
* @param originImage The origin image object to be convert
* @param originalImage The origin image object to be styled for an avatar.
* @param croppedToCircle A boolean value indicating whether or not the image should be cropped as a circle or square. Pass `YES` to crop to a circle, and `NO` to crop to a square.
*
* @return The image object for the specified file (cropped as specified), or `nil` if the method could not find the specified image.
* @return A new image object for the specified originalImage (cropped as specified), or `nil` if originalImage is not a valid, initialized image object.
*/
+ (UIImage *)avatarImage:(UIImage *)originImage
+ (UIImage *)avatarImage:(UIImage *)originalImage
croppedToCircle:(BOOL)croppedToCircle;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ + (UIImage *)avatarImageNamed:(NSString *)filename
return [self avatarImage:image croppedToCircle:croppedToCircle];
}

+ (UIImage *)avatarImage:(UIImage *)originImage
+ (UIImage *)avatarImage:(UIImage *)originalImage
croppedToCircle:(BOOL)croppedToCircle
{
return [originImage js_imageAsCircle:croppedToCircle
withDiamter:kJSAvatarImageSize borderColor:nil borderWidth:0.0f shadowOffSet:CGSizeZero];
return [originalImage js_imageAsCircle:croppedToCircle
withDiamter:kJSAvatarImageSize
borderColor:nil
borderWidth:0.0f
shadowOffSet:CGSizeZero];
}

+ (UIImage *)classicAvatarImageNamed:(NSString *)filename
Expand Down

0 comments on commit 9b7e725

Please sign in to comment.