{"id":15286877,"url":"https://github.com/bachonk/uiimageview-letters","last_synced_at":"2025-04-04T07:05:12.355Z","repository":{"id":17955494,"uuid":"20941441","full_name":"bachonk/UIImageView-Letters","owner":"bachonk","description":"UIImageView category for using initials as a placeholder image, written in Objective-C. For a Swift implementation, see https://github.com/bachonk/InitialsImageView","archived":false,"fork":false,"pushed_at":"2018-09-11T00:54:45.000Z","size":118,"stargazers_count":684,"open_issues_count":6,"forks_count":70,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-04T07:05:07.859Z","etag":null,"topics":["category","cocoapods","objective-c","placeholder","uiimageview","uiimageview-category","uiimageview-letters"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bachonk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-17T22:21:50.000Z","updated_at":"2025-01-17T15:50:47.000Z","dependencies_parsed_at":"2022-09-22T14:41:35.924Z","dependency_job_id":null,"html_url":"https://github.com/bachonk/UIImageView-Letters","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FUIImageView-Letters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FUIImageView-Letters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FUIImageView-Letters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FUIImageView-Letters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bachonk","download_url":"https://codeload.github.com/bachonk/UIImageView-Letters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135141,"owners_count":20889420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["category","cocoapods","objective-c","placeholder","uiimageview","uiimageview-category","uiimageview-letters"],"created_at":"2024-09-30T15:18:49.846Z","updated_at":"2025-04-04T07:05:12.333Z","avatar_url":"https://github.com/bachonk.png","language":"Objective-C","readme":"UIImageView+Letters\n===================\n\nAn easy, helpful UIImageView category that generates letter initials as a placeholder for user profile images, with a randomized background color\n\n*Note: Looking for a Swift 3 compatible version? Check out the new [InitialsImageView](https://github.com/bachonk/InitialsImageView) extension, rewritten entirely in Swift!*\n\n![Example screenshot](https://i.imgur.com/KE8OfrL.png)\n\n### Installation\n\n##### CocoaPods\n\nAdd this spec to your podfile:\n\n`pod \"UIImageView-Letters\"`\n\nCheck out the [official guide](http://guides.cocoapods.org/using/index.html) for getting started with CocoaPods.\n\n##### Manual\n\n1. Drag the `UIImageView+Letters.{h,m}` files into your project\n2. Enjoy!\n\n### Usage\n\nIn the file where you want to use the category, be sure to import the file. \n\n`#import \"UIImageView+Letters.h\"`\n\n##### Methods\n\nCall the following methods on any `UIImageView` instance to set the image:\n\n+ `- (void)setImageWithString:(NSString *)string`\n+ `- (void)setImageWithString:(NSString *)string color:(UIColor *)color`\n+ `- (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular`\n+ `- (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular fontName:(NSString *)fontName`\n+ `- (void)setImageWithString:(NSString *)string color:(UIColor *)color circular:(BOOL)isCircular textAttributes:(NSDictionary *)textAttributes`\n\n`string` is the string used to generate the initials. This should be a user's full name if available.\n\n`color` is an optional parameter that sets the background color of the image. Pass in `nil` to have a color automatically generated for you.\n\n`isCircular` is a boolean parameter that will automatically clip the image to a circle if enabled.\n\n`fontName` is a string that specifies a custom font. Pass in `nil` to use the system font by default. The list of provided font identifiers can be found [here](http://iosfonts.com). \n\n`textAttributes` is an NSDictionary that allows you to specify font, text color, shadow properties, etc., for the letters text, using the keys found in `NSAttributedString.h`.\n\n##### Example\n\n```\nNSString *userName = @\"Michael Bluth\";\nUIImageView *myImgView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 50, 50)];\n[myImgView setImageWithString:userName color:nil circular:YES];\n```\n\n### Saying Thanks\n\nIf you like this tool, show your support by downloading the free [Turnout](https://itunes.apple.com/us/app/turnout-make-plans-w-friends/id1393733205?mt=8) app that inspired it!\n\n### License\n\nUsing the MIT license. See license file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachonk%2Fuiimageview-letters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbachonk%2Fuiimageview-letters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachonk%2Fuiimageview-letters/lists"}