{"id":25448083,"url":"https://github.com/wk1/xcode-playground-canvas","last_synced_at":"2026-05-18T15:36:39.161Z","repository":{"id":278005944,"uuid":"934215028","full_name":"wk1/xcode-playground-canvas","owner":"wk1","description":"A SwiftUI wrapper that provides a framed Live View for Xcode Playgrounds, simulating a more structured UI environment.","archived":false,"fork":false,"pushed_at":"2025-02-17T13:17:07.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T07:48:32.058Z","etag":null,"topics":["candy","snippet","swift","ui"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wk1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-02-17T13:15:06.000Z","updated_at":"2025-02-17T14:18:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"aece4d45-8df8-486b-a955-0d55d5955f24","html_url":"https://github.com/wk1/xcode-playground-canvas","commit_stats":null,"previous_names":["wk1/xcode-playground-canvas"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wk1/xcode-playground-canvas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk1%2Fxcode-playground-canvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk1%2Fxcode-playground-canvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk1%2Fxcode-playground-canvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk1%2Fxcode-playground-canvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wk1","download_url":"https://codeload.github.com/wk1/xcode-playground-canvas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wk1%2Fxcode-playground-canvas/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265445338,"owners_count":23766448,"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":["candy","snippet","swift","ui"],"created_at":"2025-02-17T19:18:46.059Z","updated_at":"2026-05-18T15:36:34.141Z","avatar_url":"https://github.com/wk1.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PlaygroundCanvas 🖥️🎨 – A Framed Live View for Swift Playgrounds\n\n**PlaygroundCanvas** is a lightweight SwiftUI wrapper designed to enhance the experience of using SwiftUI in Xcode Playgrounds. It provides a **fixed outer frame** for the Live View, ensuring that SwiftUI behaves more consistently with how it would in a real Swift Playgrounds environment.\n\n## ✨ Features\n- 📏 **Fixed Frame** (480x720) to simulate a real device or structured layout\n- 🎨 **Subtle Styling** with gradients, rounded corners, and a soft border for a polished look\n- 🎭 **Encapsulation** to make the Live View experience more predictable and visually appealing\n- 🛠️ **Easy Integration** – Simply wrap your SwiftUI view inside `PlaygroundCanvas`\n\n## 🏗️ Usage\n```swift\nimport SwiftUI\nimport PlaygroundSupport\n\nPlaygroundPage.current.setLiveView(\n  PlaygroundCanvas {\n    ContentView() // Replace with your own view\n  }\n)\n```\n\n## 🎯 Why Use This?\nWhen working with **SwiftUI in Xcode Playgrounds**, the default Live View can feel inconsistent, especially compared to Swift Playgrounds on iPad. `PlaygroundCanvas` provides a **structured environment**, making it easier to design, test, and prototype UI components with a more **device-like experience**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwk1%2Fxcode-playground-canvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwk1%2Fxcode-playground-canvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwk1%2Fxcode-playground-canvas/lists"}