{"id":19338945,"url":"https://github.com/bestwnh/tinyvfl","last_synced_at":"2026-05-12T20:40:46.258Z","repository":{"id":84229341,"uuid":"166351331","full_name":"bestwnh/TinyVFL","owner":"bestwnh","description":"TinyVFL: A safer virtual format language for Auto Layout","archived":false,"fork":false,"pushed_at":"2019-02-03T14:50:37.000Z","size":825,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-06T10:47:28.663Z","etag":null,"topics":["autolayout","enhancement","improvement","ios","layout","macos","modern","safer","swift","swifty","virtual-format-language"],"latest_commit_sha":null,"homepage":"https://medium.com/@GalvinLi/tinyvfl-6b21110428e0","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/bestwnh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-18T05:50:23.000Z","updated_at":"2019-03-12T22:38:53.000Z","dependencies_parsed_at":"2023-05-24T01:30:30.835Z","dependency_job_id":null,"html_url":"https://github.com/bestwnh/TinyVFL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestwnh%2FTinyVFL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestwnh%2FTinyVFL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestwnh%2FTinyVFL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestwnh%2FTinyVFL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bestwnh","download_url":"https://codeload.github.com/bestwnh/TinyVFL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240441992,"owners_count":19801806,"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","enhancement","improvement","ios","layout","macos","modern","safer","swift","swifty","virtual-format-language"],"created_at":"2024-11-10T03:19:18.212Z","updated_at":"2026-05-12T20:40:41.210Z","avatar_url":"https://github.com/bestwnh.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![TingVFL logo](https://github.com/bestwnh/TinyVFL/blob/master/TinyVFL.png)\nTinyVFL is a tiny library to replace the native virtual format language of Auto Layout. The native VFL is string-base and not user friendly in Swift. TingVFL implement with type safe method and easy to use.\n\n### Sample Code\nOriginal Virtual Format Language code(Old way):\n```objc\nNSLayoutConstraint.constraints(withVisualFormat: \"V:|-[view1][view2(90)]-(space@750)-[view3(==view1)]\",\n                                         options: [.alignAllLeft, .alignAllRight],\n                                         metrics: [\"space\": NSNumber(value: spaceValue)],\n                                         views: [\"view1\": view1, \"view2\": view2, \"view3\": view3])\n```\nVirtual Format Language with TinyVFL:\n```Swift\nVFL.v(.superView,\n      .space(),\n      .view(view1),\n      .view(view2, size: 90),\n      .space(spaceValue, priority: 750),\n      .view(view3, equal:view1))\n    .withOptions([.alignAllLeft, .alignAllRight])\n    .constraints\n```\nEven simplier:\n```Swift\nVFL.v(.top,\n      .s(),\n      .v(view1),\n      .v(view2, 90),\n      .s(spaceValue, p: .defaultHigh),\n      .v(view3, e:view1))\n    .withOptions([.alignAllLeft, .alignAllRight])\n    .active()\n```\n\n#### More detail can be found in these articles:\n- [TinyVFL: A safer virtual format language for Auto Layout](https://medium.com/@GalvinLi/tinyvfl-6b21110428e0)\n- [TinyVFL: 更安全的Auto Layout Virtual Format Language实现](https://medium.com/@GalvinLi/tinyvfl-更安全的auto-layout-virtual-format-language实现-8d15b5db2aeb)\n\nMore similar articles can found in [TinySeries](https://medium.com/tag/tiny-series/latest)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestwnh%2Ftinyvfl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbestwnh%2Ftinyvfl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestwnh%2Ftinyvfl/lists"}