Visual_Novel_iOS/crush/Crush/Src/Components/UI/BaseView/CLPageControl.swift

32 lines
636 B
Swift
Raw Normal View History

2025-10-09 10:29:35 +00:00
//
// CLPageControl.swift
// Crush
//
// Created by Leon on 2025/9/4.
//
import UIKit
class CLPageControl: UIPageControl {
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupViews()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func setupViews() {
numberOfPages = 0
currentPage = 0
pageIndicatorTintColor = .white.withAlphaComponent(0.45)
currentPageIndicatorTintColor = .white
hidesForSinglePage = true
}
}