Open KhayraHongtao opened 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
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