Skip to content

Commit 939f882

Browse files
Clean code
1 parent 9c867c8 commit 939f882

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

BBSwiftUIKit/BBSwiftUIKit/BBPageControl.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,13 @@ public extension BBPageControl {
3131
public struct BBPageControl: UIViewRepresentable {
3232
@Binding var currentPage: Int
3333
var numberOfPages: Int
34-
var hidesForSinglePage: Bool
34+
var hidesForSinglePage: Bool = false
3535
var pageIndicatorTintColor: UIColor?
3636
var currentPageIndicatorTintColor: UIColor?
3737

38-
public init(currentPage: Binding<Int>,
39-
numberOfPages: Int,
40-
hidesForSinglePage: Bool = false,
41-
pageIndicatorTintColor: UIColor? = nil,
42-
currentPageIndicatorTintColor: UIColor? = nil)
43-
{
38+
public init(currentPage: Binding<Int>, numberOfPages: Int) {
4439
self._currentPage = currentPage
4540
self.numberOfPages = numberOfPages
46-
self.hidesForSinglePage = hidesForSinglePage
47-
self.pageIndicatorTintColor = pageIndicatorTintColor
48-
self.currentPageIndicatorTintColor = currentPageIndicatorTintColor
4941
}
5042

5143
public func makeUIView(context: Context) -> UIPageControl {

0 commit comments

Comments
 (0)