Skip to content

Commit

Permalink
Merge pull request #3 from samdawes/1.0.1
Browse files Browse the repository at this point in the history
Make PageView public
  • Loading branch information
samdawes committed Feb 19, 2024
2 parents 2f63795 + cf42426 commit 5303d55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/SegmentedControlPageView/Views/PageView.swift
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import SwiftUI

@available(iOS 13.0, visionOS 1.0, *)
struct PageView<Page: View>: View {
public struct PageView<Page: View>: View {
private var pages: [Page]
@Binding private var selection: Int

init(
public init(
_ pages: [Page],
selection: Binding<Int>
) {
self.pages = pages
self._selection = selection
}

var body: some View {
public var body: some View {
if #available(iOS 14, visionOS 1.0, *) {
TabView(selection: $selection) {
ForEach(0..<pages.count, id:\.self) { index in
Expand Down

0 comments on commit 5303d55

Please sign in to comment.