LvJianfeng / LLCycleScrollView

Swift - 轮播图,文本轮播,支持左右箭头
MIT License
373 stars 65 forks source link

当轮播view 的 left 不是0, right 不是0的时候,你的pageUI就有问题 #95

Open KhayraHongtao opened 1 year ago

KhayraHongtao commented 1 year ago

if pageControlPosition == .center { pageControl?.frame = CGRect.init(x: 0, y: self.ll_h-pageControlBottom, width: UIScreen.main.bounds.width, height: 10) }else{ let pointSize = pageControl?.size(forNumberOfPages: self.imagePaths.count) if pageControlPosition == .left { pageControl?.frame = CGRect.init(x: -(UIScreen.main.bounds.width - (pointSize?.width)! - pageControlLeadingOrTrialingContact) 0.5, y: self.ll_h-pageControlBottom, width: UIScreen.main.bounds.width, height: 10) }else{ pageControl?.frame = CGRect.init(x: (UIScreen.main.bounds.width - (pointSize?.width)! - pageControlLeadingOrTrialingContact) 0.5, y: self.ll_h-pageControlBottom, width: UIScreen.main.bounds.width, height: 10) } }

、、你是有的 系统屏幕宽度 UIScreen.main.bounds.width