{"id":15293613,"url":"https://github.com/dimix/storyboardconstraint","last_synced_at":"2025-04-13T14:07:49.985Z","repository":{"id":62456108,"uuid":"82388220","full_name":"dimix/StoryboardConstraint","owner":"dimix","description":"A simple way to use programmatically Autolayout Constraint created in Storyboard.","archived":false,"fork":false,"pushed_at":"2019-04-04T14:57:37.000Z","size":1953,"stargazers_count":25,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T14:07:44.790Z","etag":null,"topics":["autolayout","autolayout-constraints","constraints","swift","swift-3"],"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/dimix.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-02-18T13:22:17.000Z","updated_at":"2019-06-10T06:41:28.000Z","dependencies_parsed_at":"2022-11-01T22:46:37.780Z","dependency_job_id":null,"html_url":"https://github.com/dimix/StoryboardConstraint","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/dimix%2FStoryboardConstraint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimix%2FStoryboardConstraint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimix%2FStoryboardConstraint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimix%2FStoryboardConstraint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimix","download_url":"https://codeload.github.com/dimix/StoryboardConstraint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724635,"owners_count":21151561,"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":["autolayout","autolayout-constraints","constraints","swift","swift-3"],"created_at":"2024-09-30T16:50:11.734Z","updated_at":"2025-04-13T14:07:49.965Z","avatar_url":"https://github.com/dimix.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StoryboardConstraint\nA simple way to use programmatically Autolayout Constraint created in Storyboard.\n\n![alt tag](https://raw.githubusercontent.com/dimix/StoryboardConstraint/master/readme-images/demo.gif)\n\n## Features\n- Predefined basic constraints: top, bottom, leading, trailing, height, width, centerX, centerY\n- A complete method to find a specific constraint through the views\n\n#### Podfile\n\nTo integrate StoryboardConstraint into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\n\ntarget 'TargetName' do\n  use_frameworks!\n  pod 'StoryboardConstraint'\nend\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n## How to Use\n\n#### 1. Add UIView+StoryboardConstraint.swift on your project\n#### 2. Get the constraints\n\nYou can get the constraint set in Storyboard like this:\n\n```swift\ncustomView.heightConstraint?.constant = 200\ncustomView.topConstraint?.constant = 20\n```\n\nYou can also set a custom constraint identifier and get it like this:\n\n```swift\nview.constraint(withIdentifier: \"customWidth\", searchInSubviews: true)?.constant = 50\n```\n\nIf you want you can get all the constraints with a specified attribute like this:\n\n```swift\nview.constraints(withAttribute: .height)\n```\nThis method returns all the constraints found ordered by priority.\n\n## Requirements\n\nCurrent version is compatible with:\n\n* Swift 5.0\n* iOS 10 or later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimix%2Fstoryboardconstraint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimix%2Fstoryboardconstraint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimix%2Fstoryboardconstraint/lists"}