{"id":13340137,"url":"https://github.com/samdawes/SegmentedControlPageView","last_synced_at":"2025-03-11T16:32:27.744Z","repository":{"id":223060665,"uuid":"752354746","full_name":"samdawes/SegmentedControlPageView","owner":"samdawes","description":"Native Segmented Control + Page View implementation for SwiftUI. Supports iOS/iPadOS 13+ and visionOS 1+","archived":false,"fork":false,"pushed_at":"2024-02-24T21:11:35.000Z","size":27,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T18:49:51.991Z","etag":null,"topics":["ios","ios-app","ios13","ipados","page-view","pageview","pageviewcontroller","segmented-control","segmentedcontrol","swift","swift-package","swiftpackage","swiftui","swiftui-example","visionos","visionos-animation","visionos-interaction"],"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/samdawes.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}},"created_at":"2024-02-03T17:35:00.000Z","updated_at":"2025-02-18T20:36:45.000Z","dependencies_parsed_at":"2024-02-24T22:26:06.153Z","dependency_job_id":"297d1fd7-ec30-498a-b7bb-1d733a1c49e9","html_url":"https://github.com/samdawes/SegmentedControlPageView","commit_stats":null,"previous_names":["samdawes/segmentedcontrolpageview"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdawes%2FSegmentedControlPageView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdawes%2FSegmentedControlPageView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdawes%2FSegmentedControlPageView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdawes%2FSegmentedControlPageView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdawes","download_url":"https://codeload.github.com/samdawes/SegmentedControlPageView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243070484,"owners_count":20231464,"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":["ios","ios-app","ios13","ipados","page-view","pageview","pageviewcontroller","segmented-control","segmentedcontrol","swift","swift-package","swiftpackage","swiftui","swiftui-example","visionos","visionos-animation","visionos-interaction"],"created_at":"2024-07-29T19:22:08.078Z","updated_at":"2025-03-11T16:32:22.692Z","avatar_url":"https://github.com/samdawes.png","language":"Swift","readme":"# SegmentedControlPageView\n**Offers a seamless integration of a segmented control and a page view in native SwiftUI applications**. Users can navigate between pages by swiping or tapping on segments in the control. Compatible with iOS 13+ and visionOS 1+. \n![2024-02-18 18 34 46](https://github.com/samdawes/SegmentedControlPageView/assets/12502222/23e2b34f-e332-44e8-a47f-c463710e21db)\n![2024-02-18 18 54 14](https://github.com/samdawes/SegmentedControlPageView/assets/12502222/bcf97d3e-2563-4bcc-906c-fa4a2f54e264)\n\n## Usage\nThe following example shows a possible onboarding process. The segmented control has three segments with the labels `Welcome`, `Features`, and `Next Steps` that correspond to three custom SwiftUI views: `WelcomeView()`, `FeaturesView()`, and `NextStepsView()`.\n```swift\nimport SegmentedControlPageView\n\n@State var currentSelection: Int = 0\n\nSegmentedControlPageView(\n  \"Onboarding Process\",\n  selection: $currentSelection,\n  labels: [\n    \"Welcome\",\n    \"Features\",\n    \"Next Steps\"\n  ],\n  pages: [\n    WelcomeView(),\n    FeaturesView(),\n    NextStepsView()\n  ]\n)\n```\nIf you'd like to use the page view without the segmented control, initialize a `PageView` in your project. This will fall back to a UIKit implementation for older versions of iOS, to ensure consistency on all versions.\n```swift\nPageView([\n  WelcomeView(),\n  FeaturesView(),\n  NextStepsView()\n], selection: $currentSelection)\n```\n\n## Requirements\n- iOS 13.0 or later\n- visionOS 1.0 or later\n\n## Installation\n### Swift Package Manager\nIn Xcode go to Project -\u003e Your Project Name -\u003e `Package Dependencies` -\u003e Tap _Plus_. Insert url:\n```\nhttps://github.com/samdawes/SegmentedControlPageView\n```\nor add it to the `dependencies` section in your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/samdawes/SegmentedControlPageView\", .upToNextMajor(from: \"1.0.0\"))\n]\n```\n### Manually\n\nIf you prefer not to use Swift Package Manager, you can integrate manually. Put the `Sources/SegmentedControlPageView` folder in your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.\n\n## Apps Using\nIf your app uses `SegmentedControlPageView`, don't hesitate to add yours to the list!\n- [LineTime for Disneyland](https://apps.apple.com/us/app/linetime-for-disneyland/id1462481042)\n- [LineTime for Disney World](https://apps.apple.com/us/app/linetime-for-disney-world/id1530744555)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdawes%2FSegmentedControlPageView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdawes%2FSegmentedControlPageView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdawes%2FSegmentedControlPageView/lists"}