Skip to content

Commit

Permalink
Merge branch 'release/2.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
msaps committed Jun 28, 2018
2 parents fc2b122 + d317785 commit 3cc46d7
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.
`Pageboy` adheres to [Semantic Versioning](http://semver.org/).

#### 2.x Releases
- `2.5.x` Releases - [2.5.0](#250) | [2.5.1](#251)
- `2.5.x` Releases - [2.5.0](#250) | [2.5.1](#251) | [2.5.2](#252)
- `2.4.x` Releases - [2.4.0](#240)
- `2.3.x` Releases - [2.3.0](#230) | [2.3.1](#231) | [2.3.2](#232) | [2.3.3](#233) | [2.3.4](#234)
- `2.2.x` Releases - [2.2.0](#220)
Expand All @@ -22,6 +22,13 @@ All notable changes to this project will be documented in this file.

---

## [2.5.1](https://github.com/uias/Pageboy/releases/tag/2.5.2)
Released on 2018-06-28

#### Fixed
- [#165](https://github.com/uias/Pageboy/pull/165) Animated transition issues when using a Right-to-left language.
- by [msaps](https://github.com/msaps).

## [2.5.1](https://github.com/uias/Pageboy/releases/tag/2.5.1)
Released on 2018-04-23

Expand Down
2 changes: 1 addition & 1 deletion Pageboy.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Pod::Spec.new do |s|

s.requires_arc = true

s.version = "2.5.1"
s.version = "2.5.2"
s.summary = "A simple, highly informative page view controller."
s.description = <<-DESC
A page view controller that provides simplified data source management, enhanced delegation and other useful features.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal extension PageboyViewController {
let animateUpdate = animated ? !isUsingCustomTransition : false
let updateBlock = {
pageViewController.setViewControllers(viewControllers,
direction: direction.pageViewControllerNavDirection,
direction: direction.layoutNormalized(isRtL: self.view.layoutIsRightToLeft).pageViewControllerNavDirection,
animated: animateUpdate,
completion:
{ (finished) in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ internal extension PageboyViewController.NavigationDirection {
}
}

internal extension PageboyViewController.NavigationDirection {

func layoutNormalized(isRtL: Bool) -> PageboyViewController.NavigationDirection {
guard isRtL else {
return self
}
return self == .forward ? .reverse : .forward
}
}

// MARK: - NavigationDirection Descriptions
extension PageboyViewController.NavigationDirection: CustomStringConvertible {
public var description: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ internal extension PageboyViewController {
/// Calculate semantic direction for RtL languages
var semanticDirection = direction
if view.layoutIsRightToLeft && navigationOrientation == .horizontal {
semanticDirection = semanticDirection == .forward ? .reverse : .forward
semanticDirection = direction.layoutNormalized(isRtL: view.layoutIsRightToLeft)
}

// create a transition and unpause display link
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pageboy/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.1</string>
<string>2.5.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down

0 comments on commit 3cc46d7

Please sign in to comment.