File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,17 +32,20 @@ Call the following methods on any `UIImageView` instance to set the image:
3232
3333+ ` - (void)setImageWithString:(NSString *)string `
3434+ ` - (void)setImageWithString:(NSString *)string color:(UIColor *)color `
35+ + ` - (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular `
3536
3637` string ` is the string used to generate the initials. This should be a user's full name if available.
3738
3839` color ` is an optional parameter that sets the background color of the image. Pass in ` nil ` to have a color automatically generated for you.
3940
41+ ` isCircular ` is a boolean parameter that will automatically clip the image to a circle if enabled.
42+
4043##### Example
4144
4245```
4346NSString *userName = @"Michael Bluth";
4447UIImageView *myImgView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 50, 50)];
45- [myImgView setImageWithString:userName];
48+ [myImgView setImageWithString:userName color:nil circular:YES ];
4649```
4750
4851### Saying Thanks
You can’t perform that action at this time.
0 commit comments