//
//  PMPageControl.swift
//  PhoneManager
//
//  Created by edy on 2025/4/8.
//

import UIKit

class PMPageControl: UIPageControl {
    
    private let activeWidth: CGFloat = 16.0
    private let inactiveWidth: CGFloat = 8.0
    private let dotSpacing: CGFloat = 8.0
    
    override func layoutSubviews() {
        super.layoutSubviews()
//        for (index, dot) in subviews.enumerated() {
//            Print("Page : %d",index)
//            let isCurrentPage = index == currentPage
//            let targetWidth = isCurrentPage ? activeWidth : inactiveWidth
//            let previousDotsWidth = CGFloat(index) * (inactiveWidth + dotSpacing)
//            let adjustX = previousDotsWidth + (isCurrentPage ? 0 : activeWidth - inactiveWidth)
//            dot.frame = CGRect(
//                x: adjustX,
//                y: dot.frame.origin.y,
//                width: targetWidth,
//                height: dot.frame.height
//            )
//        }
    }
}
