Skip to content

Commit

Permalink
Merge branch 'release/2.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
msaps committed Nov 9, 2017
2 parents d90fdd5 + 1e200a2 commit ebc822b
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 41 deletions.
11 changes: 10 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.0.x` Releases - [2.0.0](#200) | [2.0.1](#201) | [2.0.2](#202)
- `2.0.x` Releases - [2.0.0](#200) | [2.0.1](#201) | [2.0.2](#202) | [2.0.3](#203)

#### 1.x Releases
- `1.4.x` Releases - [1.4.0](#140) | [1.4.1](#141)
Expand All @@ -17,6 +17,15 @@ All notable changes to this project will be documented in this file.

---

## [2.0.3](https://github.com/uias/Pageboy/releases/tag/2.0.3)
Released on 2017-11-09

#### Fixed
- [#113](https://github.com/uias/Pageboy/issues/113) When swiping too fast PageboyViewController crashes app.
- by [msaps](https://github.com/msaps).
- [#114](https://github.com/uias/Pageboy/issues/114) Custom preferredStatusBarStyle does not work.
- by [msaps](https://github.com/msaps).

## [2.0.2](https://github.com/uias/Pageboy/releases/tag/2.0.2)
Released on 2017-10-23

Expand Down
15 changes: 15 additions & 0 deletions Example/Pageboy-Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
466A76D31FB4EFC9000B5C1C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D681E31E1E546A7D007C08F5 /* Pageboy.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D63A21501F2758D700FEA92D;
remoteInfo = "Pageboy tvOS";
};
D681E3231E546A7D007C08F5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D681E31E1E546A7D007C08F5 /* Pageboy.xcodeproj */;
Expand Down Expand Up @@ -123,6 +130,7 @@
isa = PBXGroup;
children = (
D681E3241E546A7D007C08F5 /* Pageboy.framework */,
466A76D41FB4EFC9000B5C1C /* Pageboy.framework */,
D681E3261E546A7D007C08F5 /* PageboyTests.xctest */,
);
name = Products;
Expand Down Expand Up @@ -222,6 +230,13 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
466A76D41FB4EFC9000B5C1C /* Pageboy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Pageboy.framework;
remoteRef = 466A76D31FB4EFC9000B5C1C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
D681E3241E546A7D007C08F5 /* Pageboy.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down
18 changes: 14 additions & 4 deletions Example/Pageboy-Example/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16E154a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Dje-1e-CGS">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Dje-1e-CGS">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -10,7 +14,7 @@
<objects>
<navigationController id="Dje-1e-CGS" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="2MW-ng-Id8" customClass="TransparentNavigationBar" customModule="Pageboy_Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
Expand All @@ -34,20 +38,24 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Biv-GQ-An2" customClass="GradientView" customModule="Pageboy_Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="04I-si-tu1" userLabel="Separator">
<rect key="frame" x="16" y="609" width="1" height="38"/>
<color key="backgroundColor" cocoaTouchSystemColor="lightTextColor"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="tIc-IW-LQ7"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Current Position: 0.000" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6wE-cv-fvA">
<rect key="frame" x="24" y="609" width="150" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="lightTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Current Page: 0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Fp-LH-zNg">
<rect key="frame" x="24" y="630" width="102" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="lightTextColor"/>
<nil key="highlightedColor"/>
Expand All @@ -58,7 +66,7 @@
<constraint firstAttribute="trailing" secondItem="Biv-GQ-An2" secondAttribute="trailing" id="BSX-Na-7sF"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="0Fp-LH-zNg" secondAttribute="bottom" constant="20" id="OND-ZU-QSs"/>
<constraint firstItem="04I-si-tu1" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="16" id="RIo-vQ-2a5"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="Biv-GQ-An2" secondAttribute="bottom" id="SYw-pe-B3S"/>
<constraint firstAttribute="bottom" secondItem="Biv-GQ-An2" secondAttribute="bottom" id="SYw-pe-B3S"/>
<constraint firstItem="6wE-cv-fvA" firstAttribute="top" secondItem="04I-si-tu1" secondAttribute="top" id="UzU-ev-w8q"/>
<constraint firstItem="0Fp-LH-zNg" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="24" id="YLC-eG-PKR"/>
<constraint firstItem="Biv-GQ-An2" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="doM-cR-1QK"/>
Expand Down Expand Up @@ -92,11 +100,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Page X" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0cc-Dw-8mt">
<rect key="frame" x="152" y="319" width="71.5" height="29"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="24"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="swipe me &gt;" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bIS-p2-cmU">
<rect key="frame" x="150.5" y="356" width="74" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="lightTextColor"/>
<nil key="highlightedColor"/>
Expand Down
4 changes: 4 additions & 0 deletions Example/Pageboy-Example/ChildViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class ChildViewController: UIViewController {
@IBOutlet weak var promptLabel: UILabel!

var index: Int?

override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}

override func viewDidLoad() {
super.viewDidLoad()
Expand Down
4 changes: 0 additions & 4 deletions Example/Pageboy-Example/PageViewController+Appearance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import UIKit

extension PageViewController {

override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}

// MARK: Bar buttons

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

s.requires_arc = true

s.version = "2.0.2"
s.version = "2.0.3"
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
28 changes: 28 additions & 0 deletions Sources/Pageboy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
objects = {

/* Begin PBXBuildFile section */
466A76B61FB38B32000B5C1C /* PageboyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D623B1D11E1D2DF200527F3D /* PageboyViewController.swift */; };
466A76B71FB38B32000B5C1C /* PageboyViewController+Management.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC557C1ECCC55F00A7FBB4 /* PageboyViewController+Management.swift */; };
466A76B81FB38B32000B5C1C /* PageboyViewController+ScrollDetection.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC557D1ECCC55F00A7FBB4 /* PageboyViewController+ScrollDetection.swift */; };
466A76B91FB38B32000B5C1C /* PageboyViewController+Transitioning.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F561351EDCAD6D0033C654 /* PageboyViewController+Transitioning.swift */; };
466A76BA1FB38B32000B5C1C /* PageboyViewController+Extras.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC55801ECCC5BE00A7FBB4 /* PageboyViewController+Extras.swift */; };
466A76BB1FB38B32000B5C1C /* UIViewController+PageboyExtras.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F6F8FB1EF6DC49006397D0 /* UIViewController+PageboyExtras.swift */; };
466A76BC1FB38B32000B5C1C /* PageboyAutoScroller.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC557A1ECCC55300A7FBB4 /* PageboyAutoScroller.swift */; };
466A76BD1FB38B32000B5C1C /* TransitionOperation+Action.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67E6FD71F1E58EE0019AB74 /* TransitionOperation+Action.swift */; };
466A76BE1FB38B32000B5C1C /* TransitionOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67E6FD81F1E58EE0019AB74 /* TransitionOperation.swift */; };
466A76BF1FB38B32000B5C1C /* UIView+AutoLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67E6FDA1F1E58EE0019AB74 /* UIView+AutoLayout.swift */; };
466A76C01FB38B32000B5C1C /* UIView+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67E6FDB1F1E58EE0019AB74 /* UIView+Localization.swift */; };
466A76C11FB38B32000B5C1C /* UIPageViewController+ScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67E6FE01F1E58FE0019AB74 /* UIPageViewController+ScrollView.swift */; };
466A76C21FB38B32000B5C1C /* IndexedMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67E6FE31F1E59160019AB74 /* IndexedMap.swift */; };
466A76C31FB38B32000B5C1C /* WeakWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67E6FE41F1E59160019AB74 /* WeakWrapper.swift */; };
D623B1C11E1D0C6B00527F3D /* Pageboy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D623B1B71E1D0C6A00527F3D /* Pageboy.framework */; };
D623B1C61E1D0C6B00527F3D /* PageboyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D623B1C51E1D0C6B00527F3D /* PageboyTests.swift */; };
D623B1C81E1D0C6B00527F3D /* Pageboy.h in Headers */ = {isa = PBXBuildFile; fileRef = D623B1BA1E1D0C6A00527F3D /* Pageboy.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -447,6 +461,20 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
466A76BD1FB38B32000B5C1C /* TransitionOperation+Action.swift in Sources */,
466A76B81FB38B32000B5C1C /* PageboyViewController+ScrollDetection.swift in Sources */,
466A76BB1FB38B32000B5C1C /* UIViewController+PageboyExtras.swift in Sources */,
466A76C01FB38B32000B5C1C /* UIView+Localization.swift in Sources */,
466A76BC1FB38B32000B5C1C /* PageboyAutoScroller.swift in Sources */,
466A76B61FB38B32000B5C1C /* PageboyViewController.swift in Sources */,
466A76BF1FB38B32000B5C1C /* UIView+AutoLayout.swift in Sources */,
466A76C31FB38B32000B5C1C /* WeakWrapper.swift in Sources */,
466A76BA1FB38B32000B5C1C /* PageboyViewController+Extras.swift in Sources */,
466A76B91FB38B32000B5C1C /* PageboyViewController+Transitioning.swift in Sources */,
466A76C21FB38B32000B5C1C /* IndexedMap.swift in Sources */,
466A76BE1FB38B32000B5C1C /* TransitionOperation.swift in Sources */,
466A76B71FB38B32000B5C1C /* PageboyViewController+Management.swift in Sources */,
466A76C11FB38B32000B5C1C /* UIPageViewController+ScrollView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
18 changes: 7 additions & 11 deletions Sources/Pageboy/Extensions/PageboyViewController+Management.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public extension PageboyViewController {
guard let currentIndex = self.currentIndex else { return }
guard let currentViewController = viewController(at: currentIndex) else { return }

self.pageViewController?.setViewControllers([currentViewController], direction: .forward,
animated: false, completion: nil)
updateViewControllers(to: [currentViewController], animated: false, completion: nil)
}
}

Expand Down Expand Up @@ -92,15 +91,12 @@ internal extension PageboyViewController {
return
}

self.currentIndex = defaultIndex
self.pageViewController?.setViewControllers([viewController],
direction: .forward,
animated: false,
completion: nil)

self.delegate?.pageboyViewController(self,
didReloadWith: viewController,
currentPageIndex: defaultIndex)
updateViewControllers(to: [viewController], animated: false) { _ in
self.currentIndex = defaultIndex
self.delegate?.pageboyViewController(self,
didReloadWith: viewController,
currentPageIndex: defaultIndex)
}
}

internal func viewController(at index: PageIndex) -> UIViewController? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,11 @@ internal extension PageboyViewController.NavigationDirection {
return position > previousPosition ? .forward : .reverse
}
}

internal extension UIScrollView {

/// Whether the scroll view can be assumed to be interactively scrolling
var isProbablyActiveInScroll: Bool {
return self.isTracking || self.isDragging || self.isDecelerating
}
}
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.0.2</string>
<string>2.0.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
Loading

0 comments on commit ebc822b

Please sign in to comment.