{"id":30719842,"url":"https://github.com/dankinsoid/constraintsoperators","last_synced_at":"2025-09-03T10:42:25.099Z","repository":{"id":56906554,"uuid":"201264941","full_name":"dankinsoid/ConstraintsOperators","owner":"dankinsoid","description":"Convenient operators for creating constraints","archived":false,"fork":false,"pushed_at":"2022-10-04T10:57:42.000Z","size":917,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-05T18:00:37.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dankinsoid.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":"2019-08-08T13:31:10.000Z","updated_at":"2023-05-24T10:51:09.000Z","dependencies_parsed_at":"2022-08-20T19:20:28.035Z","dependency_job_id":null,"html_url":"https://github.com/dankinsoid/ConstraintsOperators","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/dankinsoid/ConstraintsOperators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dankinsoid%2FConstraintsOperators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dankinsoid%2FConstraintsOperators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dankinsoid%2FConstraintsOperators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dankinsoid%2FConstraintsOperators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dankinsoid","download_url":"https://codeload.github.com/dankinsoid/ConstraintsOperators/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dankinsoid%2FConstraintsOperators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273431361,"owners_count":25104491,"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-09-03T02:00:09.631Z","response_time":76,"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":"2025-09-03T10:42:24.234Z","updated_at":"2025-09-03T10:42:25.084Z","avatar_url":"https://github.com/dankinsoid.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConstraintsOperators \n[![CI Status](https://img.shields.io/travis/Voidilov/ConstraintsOperators.svg?style=flat)](https://cocoapods.org/pods/ConstraintsOperators)\n[![Version](https://img.shields.io/cocoapods/v/ConstraintsOperators.svg?style=flat)](https://cocoapods.org/pods/ConstraintsOperators)\n[![License](https://img.shields.io/cocoapods/l/ConstraintsOperators.svg?style=flat)](https://cocoapods.org/pods/ConstraintsOperators)\n[![Platform](https://img.shields.io/cocoapods/p/ConstraintsOperators.svg?style=flat)](https://cocoapods.org/pods/ConstraintsOperators)\n\n## Usage\n\nСreate constraints with simple expressions:\n\n```swift\nview1.ignoreAutoresizingMask()\nview1.centerX =| view2.centerX + 10\nview1.centerY =| 15\n\nview1.width \u003c=| 200\nview1.width \u003e=| 100\n//or\nview1.width =| 100...200\n\nview1.height =| view2.height / 2 + 20\n...\nview.width =| 100\nview.width =| 200 //automatically replaces previuos width constraint\n...\nview1.height.priority(.defaultLow) =| 0\n...\nview1.height.priority(900) =| 10\n...\nlet constraint: NSLayoutConstraint = view1.height.deactivated =| 200\n...\nview1.height =| view1.superview\nview1.centerX =| view2\n...\n[view1, view2].ignoreAutoresizingMask()\n[view1, view2].height =| 200\nview1[.centerX, .centerY] =| 0\nview1.edges(.vertical) =| 0\n...\nAxis.vertical =| [10, view1, 0..., view2.fixed(200), 0...5, view3.centerY, 10]\n...\nview1.top =| view1.leading //compile error, you cannot combine incompatible attributes\n```\n\nSupported operators: `=|`, `\u003c=|`, `\u003e=|`\n\nEvery operator returns a `NSLayoutConstraint` instance with the `isActive` property set to `true`.\n\n## Installation\n\nConstraintsOperators is available through [CocoaPods](https://cocoapods.org). To install\n\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'ConstraintsOperators'\n```\n\n## Author\n\nVoidilov, voidilov@gmail.com\n\n## License\n\nConstraintsOperators 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%2Fdankinsoid%2Fconstraintsoperators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdankinsoid%2Fconstraintsoperators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdankinsoid%2Fconstraintsoperators/lists"}