{"id":18259533,"url":"https://github.com/mruvim/uiimageviewalignedswift","last_synced_at":"2025-04-08T23:39:23.559Z","repository":{"id":177396208,"uuid":"272518266","full_name":"mruvim/UIImageViewAlignedSwift","owner":"mruvim","description":"A UIImageView subclass which allows you to align the image left/right/top/bottom, even when contentMode is AspectFit","archived":false,"fork":false,"pushed_at":"2020-09-22T23:03:06.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T18:27:10.445Z","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/mruvim.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-15T18:47:43.000Z","updated_at":"2020-09-22T23:02:53.000Z","dependencies_parsed_at":"2023-07-26T06:15:49.368Z","dependency_job_id":null,"html_url":"https://github.com/mruvim/UIImageViewAlignedSwift","commit_stats":null,"previous_names":["mruvim/uiimageviewalignedswift"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mruvim%2FUIImageViewAlignedSwift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mruvim%2FUIImageViewAlignedSwift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mruvim%2FUIImageViewAlignedSwift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mruvim%2FUIImageViewAlignedSwift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mruvim","download_url":"https://codeload.github.com/mruvim/UIImageViewAlignedSwift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947822,"owners_count":21023058,"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":[],"created_at":"2024-11-05T10:38:36.431Z","updated_at":"2025-04-08T23:39:23.540Z","avatar_url":"https://github.com/mruvim.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UIImageViewAlignedSwift\n\nThis repo is a clone of [UIImageViewAlignedSwift](https://github.com/sochalewski/UIImageViewAlignedSwift) with SPM support.\n\n## Requirements\n* iOS 8.0+, tvOS 9.0+\n* Swift 5.0\n\n## Installation\n\n### Swift Package Manager\n\nAdd UIImageViewAlignedSwift as a dependency to your Package.swift.\n\n```bash\ndependencies: [\n    .package(url: \"https://github.com/mruvim/UIImageViewAlignedSwift.git\", from: \"0.1.0\")\n]\n```\n\n\n## What is it?\n\nIt is a subclass of `UIImageView` that allows you to customize the alignment of the displayed image inside the view's frame.\nThis works even if the `contentMode` is set to `.scaleAspectFit`, `.scaleAspectFill` or `.scaleToFill`.\n\n## Why a subclass of UIImageView, and not a standard UIView?\n\nBecause there are many cool categories built on top of `UIImageView`. Subclassing a standard `UIView` would mean losing them.\n\nFor example, `AFNetworking`'s async `UIImageView` category works perfectly using this container class, and you don't have to worry about a thing.\n\n## How does it work?\n\nWhen initialized, `UIImageViewAligned` will create a inner `UIImageView` which will actually hold the image displayed.\nThe main class then just repositions this inner `UIImageView` to achieve your desired alignment.\n\nAt runtime, you can change the `image`, `contentMode` or `alignment` and the image will reposition itself correctly.\n\nThe `image` property of `UIImageViewAligned` is overwritten to forward the calls to the inner `UIImageView`, so you can just drag and drop into your app.\n\n\n## License\n\nUIImageViewAlignedSwift is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmruvim%2Fuiimageviewalignedswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmruvim%2Fuiimageviewalignedswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmruvim%2Fuiimageviewalignedswift/lists"}