{"id":28788819,"url":"https://github.com/song-react/flexui","last_synced_at":"2025-10-14T20:11:56.413Z","repository":{"id":82627831,"uuid":"303344238","full_name":"song-react/FlexUI","owner":"song-react","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-21T05:29:37.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-21T10:50:25.749Z","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/song-react.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":"2020-10-12T09:36:16.000Z","updated_at":"2022-10-31T02:23:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"7511553f-650e-4c7b-aacc-bcfe09f2baae","html_url":"https://github.com/song-react/FlexUI","commit_stats":null,"previous_names":["dingsong0/flexui","song-dr/flexui","song-crypto/flexui","song-usa/flexui","song-react/flexui"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/song-react/FlexUI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FFlexUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FFlexUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FFlexUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FFlexUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/song-react","download_url":"https://codeload.github.com/song-react/FlexUI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/song-react%2FFlexUI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260439503,"owners_count":23009296,"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":"2025-06-17T21:03:56.406Z","updated_at":"2025-10-14T20:11:56.400Z","avatar_url":"https://github.com/song-react.png","language":"Swift","funding_links":["https://paypal.me/DingSongwen"],"categories":[],"sub_categories":[],"readme":"![Release](https://img.shields.io/github/release/DingSoung/FlexUI.svg)\n![Status](https://travis-ci.org/DingSoung/FlexUI.svg?branch=master)\n\n![SwiftPackage](https://img.shields.io/badge/SwiftPackage-compatible-E66848.svg?style=flat)\n\n![Language](https://img.shields.io/badge/Swift-5-FFAC45.svg?style=flat)\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-9EA59D.svg)](https://paypal.me/DingSongwen)\n\n一个 UI 开发工具\n\n# 安装\n\nSwift Package Manager\n\n```swift\nhttps://github.com/DingSoung/FlexUI master\n```\n\n# 使用 \n\nUIKit 的写法\n\n```swift\nlet view = UIVIew()\nview.backgroundColor = .gray\nview.frame = CGReact(0, 5, 200, 300)\n\nlet text = UILabel()\ntext.backgroundColor = .orange\ntext.attrbuteText = ...\ntext.frame = CGReact(10, 0, 200 * 0.8, 30)\nview.addSubView(text)\n\n...\n\nfunc layoutSubViews() {\n    view.frame = ....\n    text.frame = ...\n}\n```\n\nFlexUI的写法\n\n\n```swift\nlet flexView = View()\n    .backgroundColor(.gray)\n    .top(0)\n    .left(5)\n    .width(200)\n    .height(300)\n    .children([\n        Text()\n            .backgroundColor(.orange)\n            .left(10)\n            .width(80%)\n            .height(30)\n            .flexGrow(1)\n            .content(Text.testAttrbuteString),\n    ])\n\nflexView.layout.calculateLayout()\nflexView.recursiveSyncFrame()\n```\n\n更多用法请参考 playground\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsong-react%2Fflexui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsong-react%2Fflexui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsong-react%2Fflexui/lists"}