{"id":13466306,"url":"https://github.com/artman/Geometry","last_synced_at":"2025-03-25T21:32:00.842Z","repository":{"id":20539869,"uuid":"23819306","full_name":"artman/Geometry","owner":"artman","description":"UIView and CGRect extension that adds properties to manipulate them efficiently","archived":false,"fork":false,"pushed_at":"2017-11-03T03:47:17.000Z","size":36,"stargazers_count":91,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-12T00:21:45.138Z","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/artman.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-09-09T04:25:59.000Z","updated_at":"2024-01-16T17:42:33.000Z","dependencies_parsed_at":"2022-08-21T20:21:04.893Z","dependency_job_id":null,"html_url":"https://github.com/artman/Geometry","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artman%2FGeometry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artman%2FGeometry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artman%2FGeometry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artman%2FGeometry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artman","download_url":"https://codeload.github.com/artman/Geometry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222092014,"owners_count":16929764,"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-07-31T15:00:42.265Z","updated_at":"2024-10-29T18:31:33.448Z","avatar_url":"https://github.com/artman.png","language":"Swift","readme":"# Geometry\n[![Build Status](https://travis-ci.org/artman/Geometry.svg?branch=master)](https://travis-ci.org/artman/Geometry)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Geometry.svg)](https://cocoapods.org/pods/Geometry)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n![License](https://img.shields.io/cocoapods/l/Geometry.svg?style=flat\u0026color=gray)\n![Platform](https://img.shields.io/cocoapods/p/Geometry.svg?style=flat)\n[![Twitter](https://img.shields.io/badge/twitter-@artman-blue.svg?style=flat)](http://twitter.com/artman)\n\nGeometry is a UIView and CGRect extension that lets you work with view and rect geometry easier. It adds the following properties to UIView:\n\n* top\n* left\n* bottom\n* right\n* width\n* height\n* centerX\n* centerY\n\nAnd it lets you define CGRectangles and CGPoints as strings.\n\n## Requirements\n\n- iOS 7.0 / watchOS 2.0 / Mac OS X 10.9\n- Swift 3.0\n\n## Installation\n\nTo use Signals with a project targeting iOS 7, copy `Geometry.swift` into your project.\n\n#### CocoaPods\n\nTo integrate Geometry into your project add the following to your `Podfile`:\n\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\n\npod 'Geometry', '~\u003e 3.0'\n```\n\n#### Carthage\n\nTo integrate Geometry into your project using Carthage add the following to your `Cartfile`:\n\n```ruby\ngithub \"artman/Geometry\" ~\u003e 3.0\n```\n\n\n## Quick start\n\n```Swift\nmyView.frame = CGRect(x: 10, y: 10, width: 20, height: 20)\nmyView.left = 20 // Frame is now {{20, 10}, {20, 20}}\nmyView.width = 100 // Frame is now {{20, 10}, {100, 20}}\nmyView.right = 150 // Frame is now {{50, 10}, {100, 20}}\n```\n\nThis extension also provides StringLiteralConverters for both CGRect and CGPoint, so you can use Strings to initialize a CGRect:\n\n```Swift\nmyView.frame = \"10, 10, 20, 20\"\nmyView.center = \"50, 50\"\nvar rect: CGRect = \"20, 25, 100, 100\"\n```\n\n## Contribute\n\nTo contribute, just fork, branch \u0026 send a pull request. To get in touch, hit me up on Twitter [@artman](http://twitter.com/artman)\n\n## License\n\nGeometry is released under an MIT license. See the LICENSE file for more information\n","funding_links":[],"categories":["Libs","UI [🔝](#readme)"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartman%2FGeometry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartman%2FGeometry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartman%2FGeometry/lists"}