Skip to content

Commit

Permalink
Increased selected dot size
Browse files Browse the repository at this point in the history
  • Loading branch information
Berdikhan committed Jan 14, 2019
1 parent b373541 commit b1e690c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FPageControl/FPageControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ -(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) {
CGRect frame = view.frame;
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;
Expand Down

0 comments on commit b1e690c

Please sign in to comment.