Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Berdikhan committed Jan 8, 2019
1 parent 44bcc37 commit b1fa9fd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Example/FPageControl/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<pageControl opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="6" translatesAutoresizingMaskIntoConstraints="NO" id="kWf-5O-NGc" customClass="FPageControl">
<rect key="frame" x="130" y="137" width="97" height="37"/>
<rect key="frame" x="130" y="137" width="102" height="37"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="pageIndicatorTintColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="currentPageIndicatorTintColor" red="0.87058823529999996" green="0.12549019610000001" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/>
Expand Down
2 changes: 1 addition & 1 deletion Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions Example/Pods/Target Support Files/FPageControl/Info.plist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion FPageControl.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FPageControl'
s.version = '0.1.0'
s.version = '0.2.0'
s.summary = 'Custom Page Control for Fave'

s.description = <<-DESC
Expand Down
6 changes: 3 additions & 3 deletions FPageControl/FPageControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ -(void)prepareForInterfaceBuilder {
-(void)layoutSubviews {
[super layoutSubviews];
NSInteger i = 0;
CGFloat width = self.dotSize * (CGFloat)(self.subviews.count + 1) + self.dotSpacing * (CGFloat)(self.subviews.count - 1);
CGFloat width = self.dotSize * (CGFloat)(self.subviews.count + 2) + 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 * 2, self.dotSize);
x += self.dotSize * 2 + self.dotSpacing;
frame.size = CGSizeMake(self.dotSize * 3, self.dotSize);
x += self.dotSize * 3 + self.dotSpacing;
} else {
frame.size = CGSizeMake(self.dotSize, self.dotSize);
x += self.dotSize + self.dotSpacing;
Expand Down

0 comments on commit b1fa9fd

Please sign in to comment.