Skip to content

Commit

Permalink
Fixed public for properties (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lumyk authored Mar 28, 2024
1 parent c6c0a97 commit 1b6488a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ScrollSegmentsSwift/Classes/ScrollSegmentsSwiftUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
import SwiftUI

public struct ScrollSegmentsSwiftUI: UIViewRepresentable {
var titles: [String]
var style: ScrollSegmentStyle
var onSegmentSelected: (Int) -> Void
public let titles: [String]
public let style: ScrollSegmentStyle
public let onSegmentSelected: (Int) -> Void

init(titles: [String], style: ScrollSegmentStyle = .init(), onSegmentSelected: @escaping (Int) -> Void) {
self.titles = titles
self.style = style
self.onSegmentSelected = onSegmentSelected
}

public func makeUIView(context: Context) -> ScrollSegmentsSwift {
let segments = ScrollSegmentsSwift(titles: titles, style: style)
Expand Down

0 comments on commit 1b6488a

Please sign in to comment.