{"id":13818416,"url":"https://github.com/bielikb/UseAutoLayout","last_synced_at":"2025-05-15T23:32:03.835Z","repository":{"id":37456978,"uuid":"208366001","full_name":"bielikb/UseAutoLayout","owner":"bielikb","description":"UseAutoLayout @propertyWrapper for Swift","archived":false,"fork":false,"pushed_at":"2019-09-14T20:42:12.000Z","size":2286,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T15:15:56.557Z","etag":null,"topics":["autolayout","property-wrapper","swift"],"latest_commit_sha":null,"homepage":"","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/bielikb.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-09-14T00:11:54.000Z","updated_at":"2023-05-03T19:36:58.000Z","dependencies_parsed_at":"2022-08-19T19:40:43.552Z","dependency_job_id":null,"html_url":"https://github.com/bielikb/UseAutoLayout","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/bielikb%2FUseAutoLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bielikb%2FUseAutoLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bielikb%2FUseAutoLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bielikb%2FUseAutoLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bielikb","download_url":"https://codeload.github.com/bielikb/UseAutoLayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225387198,"owners_count":17466377,"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","property-wrapper","swift"],"created_at":"2024-08-04T07:00:45.455Z","updated_at":"2024-11-19T16:31:00.706Z","avatar_url":"https://github.com/bielikb.png","language":"Swift","readme":"# @UseAutoLayout\nProperty wrapper that enables autolayout on applied views.\n\n# Declaration:\n\n`@UseAutoLayout` property wrapper\n\n```\n@propertyWrapper\npublic struct UseAutoLayout\u003cT: UIView\u003e {\n    public var wrappedValue: T {\n        didSet {\n            setAutoLayout()\n        }\n    }\n\n    public init(wrappedValue: T) {\n        self.wrappedValue = wrappedValue\n        setAutoLayout()\n    }\n\n    func setAutoLayout() {\n        wrappedValue.translatesAutoresizingMaskIntoConstraints = false\n    }\n}\n```\n\n# Usage\n\n```\n@UseAutoLayout var label = UILabel()\n```\n\n\n## Installation\n\nProperty wrappers are defined in Swift 5.1.\nUsing @UseAutoLayout requires Xcode 11.0(and above) and Swift 5.1 toolchain\n\n\n### Swift Package Manager\n\nAdd \n`.package(url: \"https://github.com/bielikb/UseAutoLayout.git\", from: \"1.0.0\")` \nto your `Package.swift` file's `dependencies`.\n\nIf youre using Xcode 11.0 add this Swift Package to your target(s) using Xcode.\n\n# Example\n\n![Sample](assets/autolayout-1.png)\n\n---\n\n![](assets/autolayout-2.png)\n","funding_links":[],"categories":["Awesome Repositories"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbielikb%2FUseAutoLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbielikb%2FUseAutoLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbielikb%2FUseAutoLayout/lists"}