Skip to content

Commit 8fe453f

Browse files
authored
V2.0 (#43)
* version 1.1 * update changelog tag version * update version number to 2.0
1 parent dd8862f commit 8fe453f

File tree

5 files changed

+37
-7
lines changed

5 files changed

+37
-7
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Change Log
22
All notable changes to PagerTabStrip will be documented in this file.
33

4+
### [2.0.0](https://github.com/xmartlabs/PagerTabStrip/releases/tag/2.0.0)
5+
<!-- Released on 2021-08-18. -->
6+
7+
* Add segmented and bar style
8+
* Bug fixes
9+
410
### [1.0.0](https://github.com/xmartlabs/PagerTabStrip/releases/tag/1.0.0)
511
<!-- Released on 2020-01-20. -->
612

Example/Media/barStyleExample.gif

1.09 MB
Loading
2.45 MB
Loading

PagerTabStripView.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "PagerTabStripView"
3-
s.version = "1.0.1"
3+
s.version = "2.0.0"
44
s.summary = "PagerTabStripView allows navigating through pages using a custom navigation bar in SwiftUI."
55
s.homepage = "https://github.com/xmartlabs/PagerTabStripView"
66
s.license = { type: 'MIT', file: 'LICENSE' }

README.md

+30-6
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ As you may've already noticed, everything is SwiftUI code, so you can update the
9898

9999
### Customize pager style
100100

101-
You have the ability to customize some aspects of the navigation bar and its indicator bar using the `pagerTabStripViewStyle` modifier. The customizable settings are:
101+
PagerTabstripView provides 3 different ways to show the views. You have the ability to select it and customize some aspects of each one using the `pagerTabStripViewStyle` modifier.
102+
103+
#### Normal style
104+
105+
This is likely the most common pager type. The customizable settings are:
102106

103107
- Spacing between navigation bar items
104108
- Navigation bar height
@@ -125,7 +129,7 @@ struct PagerView: View {
125129
}
126130
}
127131
}
128-
.pagerTabStripViewStyle(PagerTabViewStyle(tabItemSpacing: 0, tabItemHeight: 50, indicatorBarHeight: 2, indicatorBarColor: .gray))
132+
.pagerTabStripViewStyle(.normal(indicatorBarColor: .gray, tabItemSpacing: 0, tabItemHeight: 50))
129133
}
130134
}
131135
```
@@ -136,7 +140,27 @@ In this example, we add some settings like the tab bar height, indicator bar col
136140
<img src="Example/Media/addPagerSettings.gif">
137141
</div>
138142

139-
### Navigation bar
143+
#### Bar style
144+
145+
This style only shows a bar that indicates the current view controller. The customizable settings are:
146+
147+
- Spacing between navigation bar items
148+
- Indicator bar height
149+
- Indicator bar color
150+
151+
<div style="text-align:center">
152+
<img src="Example/Media/barStyleExample.gif">
153+
</div>
154+
155+
#### Segmented style
156+
157+
This style uses a Segmented Picker to indicate which view is being displayed. You can indicate the selected color, its padding and if you want it setted in the toolbar.
158+
159+
<div style="text-align:center">
160+
<img src="Example/Media/segmentedStyleExample.gif">
161+
</div>
162+
163+
## Navigation bar
140164

141165
The navigation bar supports custom tab items. You need to specify its appearance creating a struct that implements `View` protocol.
142166

@@ -220,7 +244,7 @@ struct PagerView: View {
220244
model.reload()
221245
}
222246
}
223-
.pagerTabStripViewStyle(PagerTabViewStyle(tabItemSpacing: 0, tabItemHeight: 50, indicatorBarHeight: 2, indicatorBarColor: .gray))
247+
.pagerTabStripViewStyle(.normal(indicatorBarHeight: 2, indicatorBarColor: .gray, tabItemSpacing: 0, tabItemHeight: 50))
224248
}
225249
}
226250
```
@@ -239,15 +263,15 @@ Follow these 3 steps to run Example project
239263
To install PagerTabStripView using CocoaPods, simply add the following line to your Podfile:
240264

241265
```ruby
242-
pod 'PagerTabStripView', '~> 1.0'
266+
pod 'PagerTabStripView', '~> 2.0'
243267
```
244268

245269
### Carthage
246270

247271
To install PagerTabStripView using Carthage, simply add the following line to your Cartfile:
248272

249273
```ruby
250-
github "xmartlabs/PagerTabStripView" ~> 1.0
274+
github "xmartlabs/PagerTabStripView" ~> 2.0
251275
```
252276

253277
## Requirements

0 commit comments

Comments
 (0)