Skip to content

Commit

Permalink
Merge branch 'release/2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
msaps committed Dec 20, 2017
2 parents 3d7dbd5 + a24e407 commit 42673c0
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 48 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +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.2.x` Releases - [2.2.0](#220)
- `2.1.x` Releases - [2.1.0](#210)
- `2.0.x` Releases - [2.0.0](#200) | [2.0.1](#201) | [2.0.2](#202) | [2.0.3](#203) | [2.0.4](#204)

Expand All @@ -18,6 +19,17 @@ All notable changes to this project will be documented in this file.

---

## [2.2.0](https://github.com/uias/Pageboy/releases/tag/2.2.0)
Released on 2017-12-20

#### Updated
- [#121](https://github.com/uias/Pageboy/issues/121) Update minimum deployment target to iOS 9.
- by [msaps](https://github.com/msaps).
- [#129](https://github.com/uias/Pageboy/issues/129) Disable showsPageControl temporarily (Due to iOS 11.2 issue).
- by [msaps](https://github.com/msaps).

---

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

Expand Down
4 changes: 2 additions & 2 deletions Example/Pageboy-Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -409,7 +409,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
33 changes: 15 additions & 18 deletions Example/Pageboy-Example/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Dje-1e-CGS">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -29,10 +30,6 @@
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="PageViewController" customModule="Pageboy_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand All @@ -49,32 +46,35 @@
</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"/>
<rect key="frame" x="24" y="609" width="327" 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"/>
<rect key="frame" x="24" y="630" width="327" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" cocoaTouchSystemColor="lightTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="M0K-1l-BeV" firstAttribute="trailing" secondItem="6wE-cv-fvA" secondAttribute="trailing" constant="24" id="1dF-jf-TvW"/>
<constraint firstItem="M0K-1l-BeV" firstAttribute="trailing" secondItem="0Fp-LH-zNg" secondAttribute="trailing" constant="24" id="909-nq-Ovy"/>
<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="M0K-1l-BeV" firstAttribute="bottom" secondItem="0Fp-LH-zNg" secondAttribute="bottom" constant="20" id="OND-ZU-QSs"/>
<constraint firstItem="04I-si-tu1" firstAttribute="leading" secondItem="M0K-1l-BeV" secondAttribute="leading" constant="16" id="RIo-vQ-2a5"/>
<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="0Fp-LH-zNg" firstAttribute="leading" secondItem="M0K-1l-BeV" 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"/>
<constraint firstItem="0Fp-LH-zNg" firstAttribute="bottom" secondItem="04I-si-tu1" secondAttribute="bottom" id="ffN-Om-LoM"/>
<constraint firstItem="0Fp-LH-zNg" firstAttribute="top" secondItem="6wE-cv-fvA" secondAttribute="bottom" constant="4" id="hLp-Gu-JLe"/>
<constraint firstItem="6wE-cv-fvA" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="24" id="rWK-Ix-ZyL"/>
<constraint firstItem="6wE-cv-fvA" firstAttribute="leading" secondItem="M0K-1l-BeV" secondAttribute="leading" constant="24" id="rWK-Ix-ZyL"/>
<constraint firstItem="Biv-GQ-An2" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="zjl-lw-UtG"/>
</constraints>
<viewLayoutGuide key="safeArea" id="M0K-1l-BeV"/>
</view>
<navigationItem key="navigationItem" title="Pageboy" id="wg0-LJ-0PX"/>
<connections>
Expand All @@ -91,10 +91,6 @@
<scene sceneID="PIR-jd-Ab9">
<objects>
<viewController storyboardIdentifier="ChildViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="H7W-RR-GRb" customClass="ChildViewController" customModule="Pageboy_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="RVL-Ew-FRr"/>
<viewControllerLayoutGuide type="bottom" id="5Lf-pm-IWU"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="454-9C-Wci">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand All @@ -114,11 +110,12 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="0cc-Dw-8mt" firstAttribute="centerX" secondItem="454-9C-Wci" secondAttribute="centerX" id="EYF-z1-2o5"/>
<constraint firstItem="bIS-p2-cmU" firstAttribute="centerX" secondItem="454-9C-Wci" secondAttribute="centerX" id="MzV-na-IoD"/>
<constraint firstItem="0cc-Dw-8mt" firstAttribute="centerX" secondItem="sgk-Ra-mVU" secondAttribute="centerX" id="EYF-z1-2o5"/>
<constraint firstItem="bIS-p2-cmU" firstAttribute="centerX" secondItem="sgk-Ra-mVU" secondAttribute="centerX" id="MzV-na-IoD"/>
<constraint firstItem="0cc-Dw-8mt" firstAttribute="centerY" secondItem="454-9C-Wci" secondAttribute="centerY" id="gNX-2D-f5g"/>
<constraint firstItem="bIS-p2-cmU" firstAttribute="top" secondItem="0cc-Dw-8mt" secondAttribute="bottom" constant="8" id="pJX-lJ-MwA"/>
</constraints>
<viewLayoutGuide key="safeArea" id="sgk-Ra-mVU"/>
</view>
<connections>
<outlet property="label" destination="0cc-Dw-8mt" id="ELl-Pw-7x5"/>
Expand Down
4 changes: 2 additions & 2 deletions Pageboy.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Pod::Spec.new do |s|

s.name = "Pageboy"

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.tvos.deployment_target = '10.0'

s.requires_arc = true

s.version = "2.1.0"
s.version = "2.2.0"
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- [x] Support for custom page transitions.

## Requirements
Pageboy requires iOS 8.0 / tvOS 10.0 and Swift 4.0 or above.
Pageboy requires iOS 9.0 / tvOS 10.0 and Swift 4.0 or above.

## Installation
### CocoaPods
Expand Down
6 changes: 2 additions & 4 deletions Sources/Pageboy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -602,7 +602,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -624,7 +624,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Pageboy/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.msapsford.Pageboy;
PRODUCT_NAME = Pageboy;
Expand All @@ -643,7 +642,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Pageboy/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.msapsford.Pageboy;
PRODUCT_NAME = Pageboy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ internal extension PageboyViewController {
pageViewController.dataSource = self
self.pageViewController = pageViewController

self.addChildViewController(pageViewController)

addChildViewController(pageViewController)
if let existingZIndex = existingZIndex {
self.view.insertSubview(pageViewController.view, at: existingZIndex)
view.insertSubview(pageViewController.view, at: existingZIndex)
} else {
self.view.addSubview(pageViewController.view)
self.view.sendSubview(toBack: pageViewController.view)
view.addSubview(pageViewController.view)
view.sendSubview(toBack: pageViewController.view)
}

pageViewController.view.pinToSuperviewEdges()
pageViewController.didMove(toParentViewController: self)

pageViewController.scrollView?.delegate = self
pageViewController.view.backgroundColor = .clear
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,24 @@ extension PageboyViewController: UIPageViewControllerDelegate, UIScrollViewDeleg
self.updateCurrentPageIndexIfNeeded(index)
}
}

public func presentationCount(for pageViewController: UIPageViewController) -> Int {
guard showsPageControl else {
return -1
}
return pageCount ?? 0
}

public func presentationIndex(for pageViewController: UIPageViewController) -> Int {
guard showsPageControl else {
return -1
}
return targetIndex ?? 0
}

// TODO - Enable this when issue in iOS 11.2 is resolved.
//
// See here: https://github.com/uias/Pageboy/issues/128
//
// public func presentationCount(for pageViewController: UIPageViewController) -> Int {
// guard showsPageControl else {
// return -1
// }
// return pageCount ?? 0
// }
//
// public func presentationIndex(for pageViewController: UIPageViewController) -> Int {
// guard showsPageControl else {
// return -1
// }
// return targetIndex ?? 0
// }

// MARK: UIScrollViewDelegate

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.1.0</string>
<string>2.2.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
1 change: 1 addition & 0 deletions Sources/Pageboy/PageboyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ open class PageboyViewController: UIViewController {
public let autoScroller = PageboyAutoScroller()

/// Whether to show the built-in UIPageViewController page control.
@available(*, deprecated: 1.2.0, message: "Temporarily unavailable due to iOS 11.2 UIPageViewController issue. See here: https://github.com/uias/Pageboy/issues/128")
public var showsPageControl: Bool = false

// MARK: Lifecycle
Expand Down

0 comments on commit 42673c0

Please sign in to comment.