{"id":17045873,"url":"https://github.com/totocaster/cdfinitialsavatar","last_synced_at":"2025-04-12T15:30:29.404Z","repository":{"id":56904421,"uuid":"31482838","full_name":"totocaster/CDFInitialsAvatar","owner":"totocaster","description":"Simple to use initials avatar generator for iOS. Highly customizable, but with sane defaults. Works great as a avatar placeholder and such.","archived":false,"fork":false,"pushed_at":"2017-01-29T09:07:26.000Z","size":25,"stargazers_count":89,"open_issues_count":0,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-14T15:48:52.663Z","etag":null,"topics":["avatar","avatar-generator","avatar-placeholder","initials-avatar","sane-defaults"],"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/totocaster.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":"2015-03-01T01:16:42.000Z","updated_at":"2022-11-30T09:24:54.000Z","dependencies_parsed_at":"2022-08-21T02:50:17.276Z","dependency_job_id":null,"html_url":"https://github.com/totocaster/CDFInitialsAvatar","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totocaster%2FCDFInitialsAvatar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totocaster%2FCDFInitialsAvatar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totocaster%2FCDFInitialsAvatar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totocaster%2FCDFInitialsAvatar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totocaster","download_url":"https://codeload.github.com/totocaster/CDFInitialsAvatar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589187,"owners_count":21129554,"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":["avatar","avatar-generator","avatar-placeholder","initials-avatar","sane-defaults"],"created_at":"2024-10-14T09:42:30.156Z","updated_at":"2025-04-12T15:30:29.367Z","avatar_url":"https://github.com/totocaster.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CDFInitialsAvatar\n\nSimple to use initials avatar generator for iOS. Highly customizable, but with sane defaults. Works great as a avatar placeholder till network image is loaded or as an actual image if user has no avatar at all.\n\n![Sample Image](http://totocaster.s3.amazonaws.com/public/cdfinitialsavatar_sample_screen.png)\n\n## Usage\n\nDefaults mimic look of Apple's own implementation of initial avatars, found in  Contact.app and Messages.app on iPhone or OS X. Usage can be as simple those two lines:\n\n```objc\nCDFInitialsAvatar *initialsAvatar = [[CDFInitialsAvatar alloc] initWithRect: imageView.bounds fullName:@\"Toto Tvalavadze\"];\nimageView.image = initialsAvatar.imageRepresentation; // actual drawing happens here\n```\n\n### Further Customizations\n\nYou can change `backgroundColor`, `initialsFont` and `initialsColor`. This should cover everything. For details, refer to header file. It's well documented.\n\nExample project also contains usage samples.\n\n### What About Circle Avatars?\n\nI believe generator should be responsible for content only, thus in case you want to mask content with circle (or pretty much any shape), please consider `mask` layer of your `UIImageView`.\n\nSee example project to view actual sample.\n\n## Caching\n\n`CDFInitialsAvatar` **does not** cache images it generates. Consider implementing your choice of image caching strategy when using it inside a cell views or in similar cases. In short, treat `imageView.image = initialsAvatar.imageRepresentation` as a very expensive call (which it is).\n\n## Rendering\n\nActual drawing happens when `imageRepresentation` is called and obviously, is expensive. Consider using it wisely and wrapping it with your choice of caching strategy if needed.\n\nNo drawing or/and calculations happen on `initWith...`.\n\n## License\n\nMIT. Included in source files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotocaster%2Fcdfinitialsavatar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotocaster%2Fcdfinitialsavatar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotocaster%2Fcdfinitialsavatar/lists"}