From b1e690c07ac74a72ca9b09a9db0cd9a52d0de054 Mon Sep 17 00:00:00 2001 From: Berdikhan Date: Mon, 14 Jan 2019 12:07:47 +0800 Subject: [PATCH] Increased selected dot size --- FPageControl/FPageControl.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FPageControl/FPageControl.m b/FPageControl/FPageControl.m index c9d0d99..7a3a7d9 100644 --- a/FPageControl/FPageControl.m +++ b/FPageControl/FPageControl.m @@ -43,7 +43,7 @@ -(void)prepareForInterfaceBuilder { -(void)layoutSubviews { [super layoutSubviews]; NSInteger i = 0; - CGFloat width = self.dotSize * (CGFloat)(self.subviews.count + 2) + self.dotSpacing * (CGFloat)(self.subviews.count - 1); + CGFloat width = self.dotSize * (CGFloat)(self.subviews.count + 3) + self.dotSpacing * (CGFloat)(self.subviews.count - 1); CGFloat x = self.frame.size.width / 2 - (width / 2); CGFloat y = self.frame.size.height / 2 - self.dotSize / 2; for (UIView *view in self.subviews) { @@ -51,8 +51,8 @@ -(void)layoutSubviews { frame.origin.x = x; frame.origin.y = y; if (self.currentPage == i) { - frame.size = CGSizeMake(self.dotSize * 3, self.dotSize); - x += self.dotSize * 3 + self.dotSpacing; + frame.size = CGSizeMake(self.dotSize * 4, self.dotSize); + x += self.dotSize * 4 + self.dotSpacing; } else { frame.size = CGSizeMake(self.dotSize, self.dotSize); x += self.dotSize + self.dotSpacing;