Skip to content

Commit

Permalink
Make plural
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlarsen committed May 8, 2024
1 parent 5fab619 commit d9eea7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/CLAnimatedTabView/CLAnimatedTabView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ public struct CLAnimatedTabView: View {

@State var currentTab: Int = 0
@ObservedObject var viewModel: CLAnimatedTabViewModel
private let injectedView: [AnyView]
private let injectedViews: [AnyView]

public init<T>(viewModel: CLAnimatedTabViewModel, @ViewBuilder injectedView: @escaping () -> TupleView<T>) {
public init<T>(viewModel: CLAnimatedTabViewModel, @ViewBuilder injectedViews: @escaping () -> TupleView<T>) {
self.viewModel = viewModel
self.injectedView = injectedView().getViews
self.injectedViews = injectedViews().getViews
}

public var body: some View {
ZStack(alignment: .top) {
TabView(selection: $currentTab) {
ForEach(injectedView.indices, id: \.self) { index in
injectedView[index]
ForEach(injectedViews.indices, id: \.self) { index in
injectedViews[index]
}
}
.tabViewStyle(.page(indexDisplayMode: .never))
Expand Down

0 comments on commit d9eea7a

Please sign in to comment.