{"id":16948654,"url":"https://github.com/timoliver/toborderview","last_synced_at":"2025-04-11T20:12:31.268Z","repository":{"id":45078682,"uuid":"399511193","full_name":"TimOliver/TOBorderView","owner":"TimOliver","description":"A flexible container view featuring a solid background with rounded corners.","archived":false,"fork":false,"pushed_at":"2022-01-10T14:16:53.000Z","size":252,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T20:12:25.728Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/TimOliver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"timoliver","custom":"https://tim.dev/paypal"}},"created_at":"2021-08-24T15:11:59.000Z","updated_at":"2023-05-04T11:57:36.000Z","dependencies_parsed_at":"2022-08-21T05:20:25.187Z","dependency_job_id":null,"html_url":"https://github.com/TimOliver/TOBorderView","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOBorderView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOBorderView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOBorderView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimOliver%2FTOBorderView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimOliver","download_url":"https://codeload.github.com/TimOliver/TOBorderView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248473126,"owners_count":21109628,"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-10-13T21:51:48.812Z","updated_at":"2025-04-11T20:12:31.244Z","avatar_url":"https://github.com/TimOliver.png","language":"Objective-C","funding_links":["https://github.com/sponsors/timoliver","https://tim.dev/paypal"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"screenshot.png\" width=\"650\" style=\"margin:0 auto\" /\u003e\n\u003c/p\u003e\n\n\u003cspan align=\"center\"\u003e\n  \n[![CI](https://github.com/TimOliver/TOBorderView/workflows/CI/badge.svg)](https://github.com/TimOliver/TOBorderView/actions?query=workflow%3ACI)\n[![Version](https://img.shields.io/cocoapods/v/TOBorderView.svg?style=flat)](http://cocoadocs.org/docsets/TOBorderView)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/TimOliver/TOBorderView/master/LICENSE)\n[![Platform](https://img.shields.io/cocoapods/p/TOBorderView.svg?style=flat)](http://cocoadocs.org/docsets/TOBorderView)\n  \n\u003c/span\u003e\n\n\n`TOBorderView` is a very basic container UIKit component that wraps custom view content inside a solid colored rectangle with rounded corners. It automatically handles correctly insetting the content, as well as managing the internal view hierarchy in order to guarantee maximum performance with Core Animation.\n\nStarting with iOS 11, and to a much greater extent on Big Sur, the design language on Apple's platforms has become such that separating content by enclosing it in rounded rectangles has become preferable to using high contrast hairline separators. As thisis becoming the case, it made sense to create one high quality reusable component to achieve this, than simply recreating it whenever it is needed.\n\n## Features\n\n* Encloses custom view content in a customizable rounded rectangle background.\n* Provides an internal content view adjusted by the insets, making it much easier to insert and configure the frames of view content.\n* Internally manages the layering of the content and the background views to ensure that off-screen render passes don't occur as much as possible, ensuring best possible performance.\n* Provides convenience properties and methods for configuring view content to have adjusted corner radius values that align with the outer radius.\n* The rounded rectangle background view can potentially be made translucent using `UIVisualEffectView`.\n\n## System Requirements\niOS 9.0 and above.\n\n## Installation\n\n**As a CocoaPods Dependency**\n\nAdd the following to your Podfile:\n```\npod 'TOBorderView'\n```\n\n**Swift Package Manager**\n\nWill be coming as soon as I get the time! If you can't wait, please consider filing a PR.\n\n**Manual Installation**\n\nCopy the folder `TOBorderView` to your Xcode project.\n\n`TOBorderView` is an Objective-C project, but it has been written to work properly in Swift as well. If you are using it in a Swift project, don't forget to include it in your Objective-C bridging header.\n\n## Examples\n\n```objc\n// Make an image view as some kind of content\nUIImageView *imageView = [[UIImageView alloc] initWithFrame:(CGRect){0,0,100,135}];\n\n// Make a border view\nTOBorderView *borderView = [[TOBorderView alloc] init];\n\n// Set the insets to be really tight around the imaga\n[borderView setAllContentInsets: 10.0f];\n\n// Add the image view to the border view\n[borderView addSubview: imageView];\n\n// Configure the image view to have matching corner radius\n[borderView applyContentCornerRadiusToView: imageView];\n\n// Size the border view to wrap around the image view\n[borderView sizeToFit];\n\n```\n\n## Credits\n`TOBorderView` was originally created by [Tim Oliver](http://twitter.com/TimOliverAU) as a component for iComics 2, an upcoming comic reader app for iOS.\n\niOS Device mockups used in the screenshot created by [Pixeden](http://www.pixeden.com).\n\n## License\n`TOBorderView` is licensed under the MIT License, please see the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoliver%2Ftoborderview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimoliver%2Ftoborderview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoliver%2Ftoborderview/lists"}