{"id":20478106,"url":"https://github.com/swiftui-plus/presentation","last_synced_at":"2025-07-17T12:38:14.814Z","repository":{"id":46697057,"uuid":"400897036","full_name":"SwiftUI-Plus/Presentation","owner":"SwiftUI-Plus","description":"Provides a custom presentation modifier that provides more options including full screen presentations. (iOS)","archived":false,"fork":false,"pushed_at":"2022-07-06T21:53:44.000Z","size":25,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T04:12:32.949Z","etag":null,"topics":["fullscreen","modal","present","presentation","swift","swiftui","viewcontroller"],"latest_commit_sha":null,"homepage":"https://benkau.com/packages.json","language":"Swift","has_issues":false,"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/SwiftUI-Plus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-28T21:51:51.000Z","updated_at":"2024-10-24T04:53:30.000Z","dependencies_parsed_at":"2022-09-13T00:32:23.570Z","dependency_job_id":null,"html_url":"https://github.com/SwiftUI-Plus/Presentation","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftUI-Plus%2FPresentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftUI-Plus%2FPresentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftUI-Plus%2FPresentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftUI-Plus%2FPresentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwiftUI-Plus","download_url":"https://codeload.github.com/SwiftUI-Plus/Presentation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717238,"owners_count":21150389,"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":["fullscreen","modal","present","presentation","swift","swiftui","viewcontroller"],"created_at":"2024-11-15T15:35:14.070Z","updated_at":"2025-04-13T13:12:57.580Z","avatar_url":"https://github.com/SwiftUI-Plus.png","language":"Swift","readme":"![ios](https://img.shields.io/badge/iOS-13-green)\n\n----\n\n\u003e An improved backport is now available as a set of `.backport.presentation` modifiers, in a single Backports library, with a LOT more additions. This should simply my efforts and allow me and others to contribute more backports in the near future.\n\u003e [SwiftUI Backports](https://github.com/shaps80/SwiftUIBackports)\n\n----\n\n# Presentation\n\n\u003e Also available as a part of my [SwiftUI+ Collection](https://benkau.com/packages.json) – just add it to Xcode 13+\n\nProvides a custom presentation modifier that provides more options including full screen presentations.\n\n## Features\n\nPresentation allows the configuration of the following properties:\n\n-   UIModalTransitionStyle\n-   UIModalPresentationStyle\n-   isModalInPresentation\n-   Easy API for presenting SwiftUI from UIKit\n\n## Example\n\nSheet replacement in SwiftUI with a custom environment value:\n\n```swift\nstruct Presenting: View {\n    @State private var presentSheet: Bool = false\n    @State private var presentFullscreen: Bool = false\n\n    var body: some View {\n        VStack(spacing: 20) {\n            Button {\n                presentSheet = true\n            } label: {\n                Text(\"Present Modal\")\n            }\n            .present(isPresented: $present) { Presented() }\n\n            Button {\n                presentFullscreen = true\n            } label: {\n                Text(\"Present Fullscreen\")\n            }\n            .present(isPresented: $present, style: .fullscreen) { Presented() }\n        }\n    }\n}\n\nstruct Presented: View {\n    @Environment(\\.presentation) private var presentation // note this is __not__ `presentationMode`\n    var body: some View {\n        Button {\n            presentation.wrappedValue.dismiss() // but it has an identical API\n        } label: {\n            Text(\"Dismiss\")\n        }\n    }\n}\n```\n\nPresent from UIKit with a convenient and familiar API:\n\n```swift\ncontroller.present(Presented())\n```\n\n## Installation\n\nThe code is packaged as a framework. You can install manually (by copying the files in the `Sources` directory) or using Swift Package Manager (**preferred**)\n\nTo install using Swift Package Manager, add this to the `dependencies` section of your `Package.swift` file:\n\n`.package(url: \"https://github.com/SwiftUI-Plus/Presentation.git\", .upToNextMinor(from: \"1.0.0\"))`\n\n\u003e Note: The package requires iOS v13+\n\n## Other Packages\n\nIf you want easy access to this and more packages, add the following collection to your Xcode 13+ configuration:\n\n`https://benkau.com/packages.json`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftui-plus%2Fpresentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftui-plus%2Fpresentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftui-plus%2Fpresentation/lists"}