{"id":1515,"url":"https://github.com/bachonk/InitialsImageView","last_synced_at":"2025-08-02T04:31:23.295Z","repository":{"id":56915486,"uuid":"86189871","full_name":"bachonk/InitialsImageView","owner":"bachonk","description":"A simple UIImageView extension for using initials as a profile image, written in swift","archived":false,"fork":false,"pushed_at":"2022-08-07T16:19:18.000Z","size":30,"stargazers_count":216,"open_issues_count":5,"forks_count":41,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-30T04:22:01.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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":"2017-03-25T21:32:51.000Z","updated_at":"2025-04-17T07:58:15.000Z","dependencies_parsed_at":"2022-08-20T21:20:12.865Z","dependency_job_id":null,"html_url":"https://github.com/bachonk/InitialsImageView","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/bachonk/InitialsImageView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FInitialsImageView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FInitialsImageView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FInitialsImageView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FInitialsImageView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bachonk","download_url":"https://codeload.github.com/bachonk/InitialsImageView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachonk%2FInitialsImageView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334611,"owners_count":24233793,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-01-05T20:15:48.275Z","updated_at":"2025-08-02T04:31:23.028Z","avatar_url":"https://github.com/bachonk.png","language":"Swift","readme":"InitialsImageView\n===================\n\nAn easy, helpful UIImageView extension that generates letter initials as a placeholder for user profile images, with a randomized background color\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 \"InitialsImageView\"`\n\nCheck out the [official guide](http://guides.cocoapods.org/using/index.html) for getting started with CocoaPods.\n\n##### Swift Package Manager\n\nYou can use the [Swift Package Manager](https://swift.org/package-manager/) to install `InitialsImageView` by adding it to the `dependencies` value of your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/bachonk/InitialsImageView.git\", .upToNextMajor(from: \"0.0.0\"))\n]\n```\n\n##### Manual\n\n1. Drag the `InitialsImageView.swift` file into your project\n2. Enjoy!\n\n### Usage\n\n##### Methods\n\nCall the following methods on any `UIImageView` instance to set the image:\n\n+ `setImageForName(string: String, backgroundColor: UIColor?, circular: Bool, textAttributes: [String: AnyObject]?)`\n\n`string` is the string used to generate the initials. This should be a user's full name if available.\n\n`backgroundColor` 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`circular` is a boolean parameter that will automatically clip the image to a circle if enabled.\n\n`textAttributes` is an optional dictionary of predefined character attributes for text. You can find the list of available keys in NSAttributedString\n\n##### Example\n\n```\nlet randomImage: UIImageView = UIImageView.init(frame: CGRect(x: self.view.bounds.midX - 40, y: self.view.bounds.midY - 80 - 40, width: 80, height: 80))\nrandomImage.setImageForName(string: \"Michael Bluth\", backgroundColor: nil, circular: true, textAttributes: nil)\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":["Media","ImageView"],"sub_categories":["Image","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachonk%2FInitialsImageView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbachonk%2FInitialsImageView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachonk%2FInitialsImageView/lists"}