Skip to content

Commit cdab344

Browse files
authored
Merge pull request #14 from ChiliLabs/fix/fresno
Fixes #13
2 parents c7cf7dc + f7c4f40 commit cdab344

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHIPageControl.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'CHIPageControl'
3-
s.version = '0.0.5'
3+
s.version = '0.0.6'
44
s.summary = 'CHIPageControl is a set of cool animated page controls written in Swift to replace boring UIPageControl.'
55

66
s.ios.deployment_target = '8.0'

CHIPageControl/CHIPageControlFresno.swift

+8-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,14 @@ open class CHIPageControlFresno: CHIBasePageControl {
113113
active.frame.origin.x = min.origin.x + offset
114114

115115
let index = page + 1
116-
guard elements.indices.contains(index) else { return }
116+
117+
guard elements.indices.contains(index) else {
118+
if frames.indices.contains(page) {
119+
active.frame = frames[page]
120+
}
121+
return
122+
}
123+
117124
let element = elements[index]
118125
guard frames.indices.contains(index - 1), frames.indices.contains(index) else { return }
119126

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Just add the `CHIPageControl` folder to your project.
2525

2626
use [CocoaPods](https://cocoapods.org) with Podfile:
2727
``` ruby
28-
pod 'CHIPageControl', '~> 0.0.5'
28+
pod 'CHIPageControl', '~> 0.0.6'
2929

3030
# individual page control
3131
pod 'CHIPageControl/Aji'
@@ -41,7 +41,7 @@ pod 'CHIPageControl/Puya'
4141

4242
use [Carthage](https://github.com/Carthage/Carthage) with Cartfile
4343
```ogdl
44-
github "ChiliLabs/CHIPageControl" ~> 0.0.5
44+
github "ChiliLabs/CHIPageControl" ~> 0.0.6
4545
```
4646

4747

0 commit comments

Comments
 (0)