Skip to content

Commit d54c730

Browse files
committed
Updated README.
1 parent 25d6382 commit d54c730

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ PuiSegmentedControl is a customizable for segmented control.
66
- Styling border, background, seperator etc.
77
- Animated segment change (Not working with different corner radius).
88
- Supported scroll when scrolling UIPageViewController (Same as above matter).
9+
- Supported custom page view with PuiPageViewSegmentedControl.
910
- Written with Swift :)
1011

1112
## Installation
@@ -20,7 +21,7 @@ pod 'PuiSegmentedControl'
2021
To integrate PuiSegmentedControl into your Xcode project using Carthage, specify it in your `Cartfile`:
2122

2223
```bash
23-
github "kbakacak/PuiSegmentedControl" ~> 1.2.0
24+
github "kbakacak/PuiSegmentedControl" ~> 2.0.0
2425
```
2526

2627
Run `carthage update` to build the framework and drag the built `PuiSegmentedControl.framework` into your Xcode project.
@@ -60,9 +61,16 @@ open var isSeperatorActive: Bool = true // If the property is true, seperator wi
6061
open var items: [String] = [] // The titles of segments.
6162
```
6263

63-
### Usage with UIPageViewController
64+
### Usage with Page View
6465

65-
If you want to use with UIPageViewController, you need to use ``PuiPageViewSegmentedControl`` and set ``pageViewController`` property for required delegate. You can example ``PageViewController`` in example project. ``PuiPageViewSegmentedControl``is subclass of ``PuiSegmentedControl`` so you can use same properties above.
66+
If you want to use with Page View, you need to use ``PuiPageViewSegmentedControl`` and set pages. You can example ``PageViewController`` in example project. If you want to working together with page view and segmented control then send segmented control property to page view configuration method. Threshold means selected segment change value with ratio that 0.8 means 80 percent.
67+
68+
```swift
69+
self.pageView.configure(pages: self.pages,
70+
selectedIndex: 1,
71+
segmentedControl: self.segmentedControl,
72+
nextViewSelectionThreshold: 0.8)
73+
```
6674

6775
![Screenshot](https://github.com/kbakacak/PuiSegmentedControl/blob/develop/DemoScreenshot.png)
6876

0 commit comments

Comments
 (0)