diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5dfcc7bd..14512a3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,13 +2,16 @@ name: Build on: push: branches-ignore: - - 'gh-pages' + - "gh-pages" jobs: Test: runs-on: macOS-latest steps: - uses: actions/checkout@v2 + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "16.0.0-beta" - name: Prepare run: | bundle update --bundler diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5c5cd6b8..d2f7dfd6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,13 +2,16 @@ name: Publish on: push: tags: - - '*' + - "*" jobs: publish_release: runs-on: macOS-latest steps: - uses: actions/checkout@v2 + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "16.0.0-beta" - name: Prepare run: | bundle update --bundler diff --git a/CHANGELOG.md b/CHANGELOG.md index f5bdde68..e2e533f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,20 @@ # Change Log + All notable changes to this project will be documented in this file. `Pageboy` adheres to [Semantic Versioning](https://semver.org/). +#### 5.x Releases + +- `5.0.x` Releases - [5.0.0](#500) + #### 4.x Releases + - `4.2.x` Releases - [4.2.0](#420) - `4.1.x` Releases - [4.1.0](#410) - `4.0.x` Releases - [4.0.0](#400) | [4.0.1](#401) | [4.0.2](#402) #### 3.x Releases + - `3.7.x` Releases - [3.7.0](#370) - `3.6.x` Releases - [3.6.0](#360) | [3.6.1](#361) | [3.6.2](#362) - `3.5.x` Releases - [3.5.0](#350) | [3.5.1](#351) @@ -18,6 +25,7 @@ All notable changes to this project will be documented in this file. - `3.0.x` Releases - [3.0.0](#300) | [3.0.1](#301) | [3.0.2](#302) | [3.0.3](#303) | [3.0.4](#304) | [3.0.5](#305) | [3.0.6](#306) | [3.0.7](#307) #### 2.x Releases + - `2.6.x` Releases - [2.6.0](#260) | [2.6.1](#261) - `2.5.x` Releases - [2.5.0](#250) | [2.5.1](#251) | [2.5.2](#252) | [2.5.3](#253) | [2.5.4](#254) - `2.4.x` Releases - [2.4.0](#240) @@ -27,6 +35,7 @@ All notable changes to this project will be documented in this file. - `2.0.x` Releases - [2.0.0](#200) | [2.0.1](#201) | [2.0.2](#202) | [2.0.3](#203) | [2.0.4](#204) #### 1.x Releases + - `1.4.x` Releases - [1.4.0](#140) | [1.4.1](#141) - `1.3.x` Releases - [1.3.0](#130) | [1.3.1](#131) | [1.3.2](#132) | [1.3.3](#133) - `1.2.x` Releases - [1.2.0](#120) | [1.2.1](#121) @@ -34,686 +43,889 @@ All notable changes to this project will be documented in this file. - `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101) | [1.0.2](#102) | [1.0.3](#103) | [1.0.4](#104) | [1.0.5](#105) | [1.0.6](#106) | [1.0.7](#107) | [1.0.8](#108) | [1.0.9](#109) #### 0.x Releases + - `0.4.x` Releases - [0.4.0](#040) | [0.4.1](#041) | [0.4.2](#042) | [0.4.3](#043) | [0.4.4](#044) | [0.4.5](#045) | [0.4.6](#046) | [0.4.7](#047) | [0.4.8](#048) | [0.4.9](#049) | [0.4.10](#0410) | [0.4.11](#0411) | [0.4.12](#0412) --- + +## [5.0.0](https://github.com/uias/Pageboy/releases/tag/5.0.0) + +Released on 2024-09-XX + +#### Added + +- Support for Strict Concurrency with Swift 6. +- Pageboy now requires iOS 14 / tvOS 14 or greater. + +#### Updated + +- Removed `UIViewController.parentPageboy`. + +--- + ## [4.2.0](https://github.com/uias/Pageboy/releases/tag/4.2.0) + Released on 2024-04-14 #### Updated + - Downgraded SPM Swift requirement to Swift 5.7 (Xcode 14). --- ## [4.1.0](https://github.com/uias/Pageboy/releases/tag/4.1.0) + Released on 2024-04-06 #### Added + - Support for `isDirectionalLockEnabled` to `PageboyViewController`. - - by [jiro33](https://github.com/jiro33) + - by [jiro33](https://github.com/jiro33) - Support for Xcode 15. - Support for Privacy Manifests. #### Updated + - Pageboy now requires iOS 12 or tvOS 12. --- + ## [4.0.2](https://github.com/uias/Pageboy/releases/tag/4.0.2) + Released on 2022-11-08 #### Updated + - Improved locking logic for ignoring duplicate `setViewController()` attempts. #### Fixed + - Issue where setting view controllers could fail to report `completion`. ## [4.0.1](https://github.com/uias/Pageboy/releases/tag/4.0.1) + Released on 2022-11-03 #### Fixed + - Issue where `UIPageViewController` could crash during fast sequential transitions. - - by [BasBuijsen](https://github.com/BasBuijsen) + - by [BasBuijsen](https://github.com/BasBuijsen) ## [4.0.0](https://github.com/uias/Pageboy/releases/tag/4.0.0) + Released on 2022-11-02 #### Added + - Support for Xcode 14 #### Updated + - Pageboy now requires iOS 11 or tvOS 11. --- + ## [3.7.0](https://github.com/uias/Pageboy/releases/tag/3.7.0) + Released on 2022-08-20 #### Updated + - Protocols now conform to `AnyObject` instead of `class`. - - by [irskep](https://github.com/irskep) + - by [irskep](https://github.com/irskep) --- + ## [3.6.2](https://github.com/uias/Pageboy/releases/tag/3.6.2) + Released on 2020-10-11 #### Fixed + - Issue where page positional detection would fail on tvOS. ## [3.6.1](https://github.com/uias/Pageboy/releases/tag/3.6.1) + Released on 2020-05-22 #### Fixed + - Scroll issue with a single view controller data source when `isInfiniteScrollEnabled = true`. - - by [dev-yong](https://github.com/dev-yong) + - by [dev-yong](https://github.com/dev-yong) ## [3.6.0](https://github.com/uias/Pageboy/releases/tag/3.6.0) + Released on 2020-05-04 #### Updated + - Dropped support for legacy Swift (4.x) versions. #### Fixed + - [#211](https://github.com/uias/Pageboy/issues/211) Issue where inserting a page at the current index could display the incorrect page. - Issue where deleting a page on an upper index could cause index corruption. - Issue where scroll interaction during updates could cause index corruption. --- + ## [3.5.1](https://github.com/uias/Pageboy/releases/tag/3.5.1) + Released on 2020-03-15 #### Fixed + - Mixed language errors caused by `Pageboy.h` header in Swift PM. - - by [ricobeck](https://github.com/ricobeck) + - by [ricobeck](https://github.com/ricobeck) ## [3.5.0](https://github.com/uias/Pageboy/releases/tag/3.5.0) + Released on 2019-10-06 #### Added + - [#230](https://github.com/uias/Pageboy/pull/230) `didCancelScrollToPage` function to `PageboyViewControllerDelegate` for detecting page transitions that were cancelled. - - by [ChristianSteffens](https://github.com/ChristianSteffens) + - by [ChristianSteffens](https://github.com/ChristianSteffens) #### Fixed + - [#227](https://github.com/uias/Pageboy/pull/227) `UIPageViewController` bug that causes the page view controller to display the wrong page ([see here](https://stackoverflow.com/questions/12939280/uipageviewcontroller-navigates-to-wrong-page-with-scroll-transition-style)). - - by [ahmedk92](https://github.com/ahmedk92) + - by [ahmedk92](https://github.com/ahmedk92) --- + ## [3.4.0](https://github.com/uias/Pageboy/releases/tag/3.4.0) + Released on 2019-08-25 #### Updated + - Add support for Swift Package Manager in Xcode 11. --- + ## [3.3.0](https://github.com/uias/Pageboy/releases/tag/3.3.0) + Released on 2019-08-05 #### Added + - [#223](https://github.com/uias/Pageboy/pull/223) `minimumNumberOfTouches` to `PageboyViewController`. - - by [ChristianSteffens](https://github.com/ChristianSteffens) + - by [ChristianSteffens](https://github.com/ChristianSteffens) - [#223](https://github.com/uias/Pageboy/pull/223) `maximumNumberOfTouches` to `PageboyViewController`. - - by [ChristianSteffens](https://github.com/ChristianSteffens) + - by [ChristianSteffens](https://github.com/ChristianSteffens) #### Fixed + - Issues with building on tvOS. - Broken imports when building with Carthage. --- + ## [3.2.3](https://github.com/uias/Pageboy/releases/tag/3.2.3) + Released on 2019-06-10 #### Updated + - Added support for multiple Swift versions to podspec. ## [3.2.2](https://github.com/uias/Pageboy/releases/tag/3.2.2) + Released on 2019-05-04 #### Fixed + - [#209](https://github.com/uias/Pageboy/issues/209) Issue where pages could not be added when no pages exist. - [#208](https://github.com/uias/Pageboy/issues/208) Issue where the last page could not be deleted. ## [3.2.1](https://github.com/uias/Pageboy/releases/tag/3.2.1) + Released on 2019-04-24 #### Fixed + - Warnings related to Objective-C enums. - - by [Coeur](https://github.com/Coeur) + - by [Coeur](https://github.com/Coeur) - SwiftLint warnings. - - by [Coeur](https://github.com/Coeur) + - by [Coeur](https://github.com/Coeur) - Incorrect Swift version in Podspec, now `4.0`. ## [3.2.0](https://github.com/uias/Pageboy/releases/tag/3.2.0) + Released on 2019-03-26 #### Added + - Swift 5 support. - Xcode 10.2 support. --- + ## [3.1.0](https://github.com/uias/Pageboy/releases/tag/3.1.0) + Released on 2019-03-08 #### Added + - `pageboyParent` to `UIViewController` to get the parent `PageboyViewController` if it exists. - `pageboyPageIndex` to `UIViewController` to get the current index of a view controller if embedded within a `PageboyViewController`. #### Updated + - Deprecated `parentPageboy` on `UIViewController`. --- + ## [3.0.7](https://github.com/uias/Pageboy/releases/tag/3.0.7) + Released on 2019-03-03 #### Fixed + - [#202](https://github.com/uias/Pageboy/issues/202) Issue where page index map could crash with invalid keys (Relates to [#198](https://github.com/uias/Pageboy/issues/198)). ## [3.0.6](https://github.com/uias/Pageboy/releases/tag/3.0.6) + Released on 2019-03-03 #### Fixed + - [#198](https://github.com/uias/Pageboy/issues/198) Memory issue where view controllers would always be retained. ## [3.0.5](https://github.com/uias/Pageboy/releases/tag/3.0.5) + Released on 2019-02-22 #### Updated + - [#196](https://github.com/uias/Pageboy/pull/196) Improved extension access controls. - - by [Coeur](https://github.com/Coeur) + - by [Coeur](https://github.com/Coeur) ## [3.0.4](https://github.com/uias/Pageboy/releases/tag/3.0.4) + Released on 2019-02-17 #### Fixed + - [#195](https://github.com/uias/Pageboy/pull/195) Ensure view controller update work is performed synchronously on the main thread. - - by [remirobert](https://github.com/remirobert) + - by [remirobert](https://github.com/remirobert) ## [3.0.3](https://github.com/uias/Pageboy/releases/tag/3.0.3) + Released on 2019-02-13 #### Updated + - [#194](https://github.com/uias/Pageboy/pull/194) Improve threading logic. - - by [remirobert](https://github.com/remirobert) + - by [remirobert](https://github.com/remirobert) ## [3.0.2](https://github.com/uias/Pageboy/releases/tag/3.0.2) + Released on 2019-02-10 #### Fixed + - [#192](https://github.com/uias/Pageboy/pull/192) Thread safety improvements to resolve `UIPageViewController` crashes. - - by [RamblinWreck77](https://github.com/RamblinWreck77). + - by [RamblinWreck77](https://github.com/RamblinWreck77). ## [3.0.1](https://github.com/uias/Pageboy/releases/tag/3.0.1) + Released on 2018-12-01 #### Fixed + - [#187](https://github.com/uias/Pageboy/issues/187) Issue where using `unowned self` could cause memory crashes. - [#176](https://github.com/uias/Pageboy/issues/176) Issue where checking UI layout direction could cause threading issues. ## [3.0.0](https://github.com/uias/Pageboy/releases/tag/3.0.0) + Released on 2018-11-13 #### Added + - Support for dynamically inserting a new page via `insertPage(at: PageIndex)`. - Support for dynamically deleting an existing page via `deletePage(at: PageIndex)`. - Improved support for Swift 4 and 4.2. #### Updated + - Status bar style update animation when changing pages now lasts 0.25 seconds. - Improved Example app with support for in-app Settings. - Auto-Scrolling will now automatically resume/pause with `viewDidAppear`/`viewWillDisappear` lifecycle events. #### Fixed + - Numerous memory leaks and performance problems. --- ## [2.6.1](https://github.com/uias/Pageboy/releases/tag/2.6.1) + Released on 2018-10-01 #### Fixed + - [#175](https://github.com/uias/Pageboy/pull/175) Issue where `expectedTransitionIndex` could be incorrect when cancelling scroll events. - - by [mlarandeau](https://github.com/mlarandeau). + - by [mlarandeau](https://github.com/mlarandeau). ## [2.6.0](https://github.com/uias/Pageboy/releases/tag/2.6.0) + Released on 2018-09-16 #### Updated + - Migrated to use Swift 4.2. --- ## [2.5.4](https://github.com/uias/Pageboy/releases/tag/2.5.4) + Released on 2018-07-19 #### Fixed + - [#166](https://github.com/uias/Pageboy/issues/166) Issue where view controllers would fail to update correctly when transitions were interrupted. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ## [2.5.3](https://github.com/uias/Pageboy/releases/tag/2.5.3) + Released on 2018-07-18 #### Fixed + - [#166](https://github.com/uias/Pageboy/issues/166) Interaction and state issues when transitions were interrupted. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ## [2.5.2](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). + - by [msaps](https://github.com/msaps). ## [2.5.1](https://github.com/uias/Pageboy/releases/tag/2.5.1) + Released on 2018-04-23 #### Fixed + - [#159](https://github.com/uias/Pageboy/issues/159) Current Index is negative when infinite scroll is enabled and scrolling between ranges. - - by [msaps](https://github.com/msaps). - + - by [msaps](https://github.com/msaps). + ## [2.5.0](https://github.com/uias/Pageboy/releases/tag/2.5.0) + Released on 2018-04-05 #### Updated + - `parentPageboyViewController` has been renamed to `parentPageboy`. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). #### Fixed + - [#157](https://github.com/uias/Pageboy/issues/157) Fix scroll detection edge case when decelerating on page index. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). --- ## [2.4.0](https://github.com/uias/Pageboy/releases/tag/2.4.0) + Released on 2018-02-23 #### Updated + - [#136](https://github.com/uias/Pageboy/issues/136) Add support for default `UIPageViewController` animated transition. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). - [#136](https://github.com/uias/Pageboy/issues/136) Obseleted `default` `Transition`. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). - Mark `showsPageControl` as unavailable rather than deprecated. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ---- +--- ## [2.3.4](https://github.com/uias/Pageboy/releases/tag/2.3.4) + Released on 2018-02-12 #### Fixed + - [#140](https://github.com/uias/Pageboy/issues/140) Potential crash when scrolling through pages with high velocity. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ## [2.3.3](https://github.com/uias/Pageboy/releases/tag/2.3.3) + Released on 2018-01-30 #### Fixed + - Build issues when trying to integrate with Carthage. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ## [2.3.2](https://github.com/uias/Pageboy/releases/tag/2.3.2) + Released on 2018-01-23 #### Updated + - Refactored and cleaned up internally for some much needed housekeeping. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ## [2.3.1](https://github.com/uias/Pageboy/releases/tag/2.3.1) + Released on 2018-01-06 #### Fixed --[#133](https://github.com/uias/Pageboy/pull/133) Potential memory issues with UIApplication extension. - - by [msaps](https://github.com/msaps). + +-[#133](https://github.com/uias/Pageboy/pull/133) Potential memory issues with UIApplication extension. - by [msaps](https://github.com/msaps). ## [2.3.0](https://github.com/uias/Pageboy/releases/tag/2.3.0) + Released on 2018-01-05 #### Updated + - [#131](https://github.com/uias/Pageboy/issues/131) Make Pageboy safe to use in extensions. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). --- ## [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). + - 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). + - by [msaps](https://github.com/msaps). --- ## [2.1.0](https://github.com/uias/Pageboy/releases/tag/2.1.0) + Released on 2017-11-24 #### Added + - [#116](https://github.com/uias/Pageboy/issues/116) Support for built-in `UIPageViewController` page control. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). - [#116](https://github.com/uias/Pageboy/issues/116) `showsPageControl` to `PageboyViewController`. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). --- ## [2.0.4](https://github.com/uias/Pageboy/releases/tag/2.0.4) + Released on 2017-11-11 #### Fixed + - [#118](https://github.com/uias/Pageboy/issues/118) Setting data source in initializer breaks `updateViewControllers`. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ## [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). + - 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). + - by [msaps](https://github.com/msaps). ## [2.0.2](https://github.com/uias/Pageboy/releases/tag/2.0.2) + Released on 2017-10-23 #### Fixed + - [#109](https://github.com/uias/Pageboy/issues/109) Improved blocking logic for animated scroll transitions during other operations. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ## [2.0.1](https://github.com/uias/Pageboy/releases/tag/2.0.1) + Released on 2017-10-22 #### Fixed + - [#109](https://github.com/uias/Pageboy/issues/109) UIPageViewController crash with intense scrolling input. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). ## [2.0.0](https://github.com/uias/Pageboy/releases/tag/2.0.0) + Released on 2017-09-13 #### Added + - [#80](https://github.com/uias/Pageboy/issues/80) Swift 4 support. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). - [#81](https://github.com/uias/Pageboy/issues/81) Support for Xcode 9 and iOS 11. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). - [#92](https://github.com/uias/Pageboy/issues/92) tvOS support. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). #### Updated + - [#88](https://github.com/uias/Pageboy/issues/88) Completely redesign `PageboyViewControllerDataSource` to support improved view controller reuse. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). - [#78](https://github.com/uias/Pageboy/issues/78) Update `PageboyViewControllerDataSource` to support the latest recommended code syntax style. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). - Update `PageboyViewControllerDelegate` to support the latest changes to `PageboyViewControllerDataSource `. - - by [msaps](https://github.com/msaps). + - by [msaps](https://github.com/msaps). --- ## [1.4.1](https://github.com/uias/Pageboy/releases/tag/1.4.1) + Released on 2017-08-14 #### Fixed -- [#99](https://github.com/uias/Pageboy/issues/99) Issues with guarding publicly visible delegates. - - Added guard statements to `UIScrollViewDelegate` and `UIPageViewControllerDelegate` functions to prevent external injection. - - Fixed by [msaps](https://github.com/msaps). +- [#99](https://github.com/uias/Pageboy/issues/99) Issues with guarding publicly visible delegates. + - Added guard statements to `UIScrollViewDelegate` and `UIPageViewControllerDelegate` functions to prevent external injection. + - Fixed by [msaps](https://github.com/msaps). ## [1.4.0](https://github.com/uias/Pageboy/releases/tag/1.4.0) + Released on 2017-07-25 #### Added + - [#90](https://github.com/uias/Pageboy/issues/90) Support for `UIPageViewController` initialization options. - - Added `interPageSpacing` property to `PageboyViewController`. - - Added by [msaps](https://github.com/msaps). + - Added `interPageSpacing` property to `PageboyViewController`. + - Added by [msaps](https://github.com/msaps). --- ## [1.3.3](https://github.com/uias/Pageboy/releases/tag/1.3.3) + Released on 2017-06-29 #### Fixed -- [#86](https://github.com/uias/Pageboy/pull/86) Fix issue where constraints were inadvertantly not added to the internal page view controller. - - Fixed by [muukii](https://github.com/muukii). + +- [#86](https://github.com/uias/Pageboy/pull/86) Fix issue where constraints were inadvertantly not added to the internal page view controller. + - Fixed by [muukii](https://github.com/muukii). ## [1.3.2](https://github.com/uias/Pageboy/releases/tag/1.3.2) + Released on 2017-06-25 #### Updated + - Renamed utility extensions. #### Fixed + - [#83](https://github.com/uias/Pageboy/issues/83) Fixed memory issue with custom transitioning support. - - Fixed by [farshadmb](https://github.com/farshadmb). + - Fixed by [farshadmb](https://github.com/farshadmb). - [#85](https://github.com/uias/Pageboy/pull/85) Fixed issue with animated transition positional updates. - - Transitions with index ranges greater than 1 will now provide positions through the entire range. + - Transitions with index ranges greater than 1 will now provide positions through the entire range. ## [1.3.1](https://github.com/uias/Pageboy/releases/tag/1.3.1) + Released on 2017-06-24. #### Fixed + - [#79](https://github.com/uias/Pageboy/issues/79) Add support for Right-to-Left language localisation to iOS 8. ## [1.3.0](https://github.com/uias/Pageboy/releases/tag/1.3.0) + Released on 2017-06-23. #### Added + - [#75](https://github.com/uias/Pageboy/issues/75) Support for iOS 8. - - Project deployment target is now `8.0`. - - Added by [farshadmb](https://github.com/farshadmb) & [msaps](https://github.com/msaps). + - Project deployment target is now `8.0`. + - Added by [farshadmb](https://github.com/farshadmb) & [msaps](https://github.com/msaps). --- ## [1.2.1](https://github.com/uias/Pageboy/releases/tag/1.2.1) + Released on 2017-06-19. #### Updated + - The internal `UIPageViewController` is now inserted at the back of all subviews in the `UIViewController`. - - The Z-Index will persist when changing `navigationOrientation` and other destructive updates. + - The Z-Index will persist when changing `navigationOrientation` and other destructive updates. ## [1.2.0](https://github.com/uias/Pageboy/releases/tag/1.2.0) + Released on 2017-06-18. #### Added + - [#67](https://github.com/uias/Pageboy/issues/67) Improved support for Right-To-Left languages to `PageboyViewController`. - `parentPageboyViewController` property to `UIViewController` to provide access to parent `PageboyViewController` from child view controllers within the page view controller. - [#70](https://github.com/uias/Pageboy/issues/70) Success result to `scrollToPage()` function in `PageboyViewController`. - - Returns whether the scroll was able to be successfully executed. + - Returns whether the scroll was able to be successfully executed. #### Fixed + - [#71](https://github.com/uias/Pageboy/pull/71) A potential error during layout with scroll positional updates. - - By AlexZd. + - By AlexZd. --- ## [1.1.2](https://github.com/uias/Pageboy/releases/tag/1.1.2) + Released on 2017-06-18. #### Fixed + - Fixed issue with animated transitions when using `.vertical` `navigationOrientation`. - Add support for `.vertical` `navigationOrientation` to example app. - - By Charles Molyneux. + - By Charles Molyneux. ## [1.1.1](https://github.com/uias/Pageboy/releases/tag/1.1.1) + Released on 2017-06-12. #### Updated + - Updated project to use Swift 3.2 and compatibility with Xcode 9 #### Fixed + - Fixed issue where it would be possible to cause an error by setting properties on `PageboyViewController` before the internal `UIPageViewController` was initialised. - Fixed issue where changing `navigationOrientation` would cause properties on `PageboyViewController` to not persist. ## [1.1.0](https://github.com/uias/Pageboy/releases/tag/1.1.0) + Released on 2017-06-07. -#### Added +#### Added + - [#57](https://github.com/uias/Pageboy/issues/57) Added support for custom scroll transitions to `PageboyViewController`. - - Available via the `.transition` (`PageboyViewController.Transition`) property. + - Available via the `.transition` (`PageboyViewController.Transition`) property. #### Fixed + - [#61](https://github.com/uias/Pageboy/issues/61) Fixed AutoLayout issue with internal `UIPageViewController` when in-call status bar is visible. --- ## [1.0.9](https://github.com/uias/Pageboy/releases/tag/1.0.9) + Released on 2017-05-29. -#### Added +#### Added + - Added `delaysContentTouches` property to `PageboyViewController`. #### Updated + - Minor improvements to example project. - Minor refactoring to `PageboyViewController` extensions. ## [1.0.8](https://github.com/uias/Pageboy/releases/tag/1.0.8) + Released on 2017-05-17. #### Updated + - Refactored and restructured internal extensions of `PageboyViewController`. - A fresh coat of paint. #### Fixed + - Fixed a few UI issues with example project. ## [1.0.7](https://github.com/uias/Pageboy/releases/tag/1.0.7) + Released on 2017-05-07. #### Added + - `isTracking` property to `PageboyViewController`. - Default stub protocol implementations for `PageboyViewControllerDelegate`. #### Updated + - Updated scroll management to use `isTracking` for interaction detection. ## [1.0.6](https://github.com/uias/Pageboy/releases/tag/1.0.6) + Released on 2017-04-26. #### Updated + - Moved internal `UIPageViewController` initialisation to `viewDidLoad` from `loadView`. ## [1.0.5](https://github.com/uias/Pageboy/releases/tag/1.0.5) + Released on 2017-04-22. #### Fixed + - [#44](https://github.com/uias/Pageboy/issues/44) Fix incorrect `scrollToPage` function behaviour when at the end of page ranges with infinite scrolling enabled. - - `.next` used an incorrect animation when scrolling from the upper range to the lower range. - - `.previous` failed to scroll to a page when scrolling from the lower range to the upper range. + - `.next` used an incorrect animation when scrolling from the upper range to the lower range. + - `.previous` failed to scroll to a page when scrolling from the lower range to the upper range. ## [1.0.4](https://github.com/uias/Pageboy/releases/tag/1.0.4) + Released on 2017-04-19. #### Added + - Added `didReload` function to `PageboyViewControllerDelegate` for updating when the `PageboyViewController` successfully reloads its child view controllers. ## [1.0.3](https://github.com/uias/Pageboy/releases/tag/1.0.3) + Released on 2017-04-16. #### Updated + - [#42](https://github.com/uias/Pageboy/issues/42) Rename `atIndex(index: Int)` to `at(index: Int)` in `PageboyViewController.PageIndex`. - - Deprecated `atIndex(index: Int)`. + - Deprecated `atIndex(index: Int)`. ## [1.0.2](https://github.com/uias/Pageboy/releases/tag/1.0.2) + Released on 2017-04-11. #### Fixed + - Added support for `preferredStatusBarStyle` in child view controllers. - Added support for `prefersStatusBarHidden` in child view controllers. - Added animation for transition of status bar appearance on page change. - Added missing `addChildViewController` call for internal `UIPageViewController`. ## [1.0.1](https://github.com/uias/Pageboy/releases/tag/1.0.1) + Released on 2017-04-05. #### Fixed + - [#34](https://github.com/uias/Pageboy/issues/34) Fixed issue in `PageboyAutoScroller` where `.handler` would not be released correctly. ## [1.0.0](https://github.com/uias/Pageboy/releases/tag/1.0.0) + Released on 2017-03-28. #### Updated + - Just a quick version bump to 1.0.0. --- ## [0.4.12](https://github.com/uias/Pageboy/releases/tag/0.4.12) + Released on 2017-03-22. #### Added + - Improved test coverage for all components of `Pageboy`. #### Updated + - `isEnabled` is now a public property of `PageboyAutoScroller`. ## [0.4.11](https://github.com/uias/Pageboy/releases/tag/0.4.11) + Released on 2017-03-13. #### Added + - Added `bounces` property to enable/disable whether the page view controller should bounce at the end of page ranges. [#20](https://github.com/uias/Pageboy/issues/20) ## [0.4.10](https://github.com/uias/Pageboy/releases/tag/0.4.10) -Released on 2017-03-11. + +Released on 2017-03-11. #### Fixed + - Fixed issue where scrolling aggressively, causing post-boundary deceleration would cause an incorrect `currentIndex` temporarily. ## [0.4.9](https://github.com/uias/Pageboy/releases/tag/0.4.9) -Released on 2017-03-08. + +Released on 2017-03-08. #### Added + - `PageboyAutoScroller` which provides time-based auto scrolling behaviour to `PageboyViewController`. Available via the `autoScroller` property. ## [0.4.8](https://github.com/uias/Pageboy/releases/tag/0.4.8) + Released on 2017-03-01. #### Fixed + - Fixed issue where infinite scroll would not provide scroll updates correctly. -- Fixed issue with setting `isInfiniteScrollEnabled` not updating page view controller state correctly. +- Fixed issue with setting `isInfiniteScrollEnabled` not updating page view controller state correctly. ## [0.4.7](https://github.com/uias/Pageboy/releases/tag/0.4.7) + Released on 2017-02-28. #### Fixed + - Fixed issue where updates for scrolling outside of the page view controller `contentSize` would not be correctly reported. ## [0.4.6](https://github.com/uias/Pageboy/releases/tag/0.4.6) + Released on 2017-02-27. #### Updated + - Ensured that `dataSource` for `PageboyViewController` is weakly referenced. - Ensured that `delegate` for `PageboyViewController` is weakly referenced. ## [0.4.5](https://github.com/uias/Pageboy/releases/tag/0.4.5) + Released on 2017-02-27. #### Fixed + - Issue where `animated` parameter on `willScrollToPageAtIndex` would sometimes be incorrect. - Issue where duplicate positional updates would call `didScrollToPosition` multiple times. ## [0.4.4](https://github.com/uias/Pageboy/releases/tag/0.4.4) + Released on 2017-02-24. #### Updated + - Improved positional reporting when traversing over multiple pages during a scroll operation. ## [0.4.3](https://github.com/uias/Pageboy/releases/tag/0.4.3) + Released on 2017-02-23. #### Updated + - Added `animated` parameter to `willScrollToPageAtIndex`. - Added `animated` parameter to `didScrollToPosition`. - Added `animated` parameter to `didScrollToPageAtIndex`. #### Fixed -- Fixed issues with `currentIndex` sync. + +- Fixed issues with `currentIndex` sync. ## [0.4.2](https://github.com/uias/Pageboy/releases/tag/0.4.2) + Released on 2017-02-22. #### Fixed + - Issue where `currentPosition` would not stay in sync with `currentIndex` in certain situations. - Issue where example app would not support custom default indexes correctly. ## [0.4.1](https://github.com/uias/Pageboy/releases/tag/0.4.1) + Released on 2017-02-17. #### Added + - Swift Package Manager compatibility. ## [0.4.0](https://github.com/uias/Pageboy/releases/tag/0.4.0) + Released on 2017-02-17. **Pageboy** initial release - A simple, highly informative page view controller. diff --git a/Package.swift b/Package.swift index ed7bcf81..395d35a4 100644 --- a/Package.swift +++ b/Package.swift @@ -6,8 +6,8 @@ import PackageDescription let package = Package( name: "Pageboy", platforms: [ - .iOS(.v12), - .tvOS(.v12) + .iOS(.v14), + .tvOS(.v14) ], products: [ .library( diff --git a/Package@swift-6.swift b/Package@swift-6.swift new file mode 100644 index 00000000..e0d60708 --- /dev/null +++ b/Package@swift-6.swift @@ -0,0 +1,30 @@ +// swift-tools-version:6.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Pageboy", + platforms: [ + .iOS(.v14), + .tvOS(.v14) + ], + products: [ + .library( + name: "Pageboy", + targets: ["Pageboy"]) + ], + targets: [ + .target( + name: "Pageboy", + path: "Sources/Pageboy", + exclude: ["Pageboy.h", "PrivacyInfo.xcprivacy"], + resources: [.process("PrivacyInfo.xcprivacy")] + ), + .testTarget( + name: "PageboyTests", + dependencies: ["Pageboy"] + ) + ], + swiftLanguageVersions: [.v6] +) diff --git a/Pageboy.xcconfig b/Pageboy.xcconfig index 364363e8..24e0b9ff 100644 --- a/Pageboy.xcconfig +++ b/Pageboy.xcconfig @@ -1,4 +1,4 @@ -PB_VERSION=4.2.0 +PB_VERSION=5.0.0 -PB_IOS_DEPLOYMENT_TARGET=12.0 -PB_TVOS_DEPLOYMENT_TARGET=12.0 +PB_IOS_DEPLOYMENT_TARGET=14.0 +PB_TVOS_DEPLOYMENT_TARGET=14.0 diff --git a/Pageboy.xcworkspace/contents.xcworkspacedata b/Pageboy.xcworkspace/contents.xcworkspacedata index 6342da4b..9773c039 100644 --- a/Pageboy.xcworkspace/contents.xcworkspacedata +++ b/Pageboy.xcworkspace/contents.xcworkspacedata @@ -4,6 +4,9 @@ + + diff --git a/README.md b/README.md index 2df5b809..bd1112e6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ - + @@ -15,9 +15,10 @@

-**TL;DR** *UIPageViewController done properly.* +**TL;DR** _UIPageViewController done properly._ ## ⭐️ Features + - [x] Simplified data source management & enhanced delegation. - [x] Dynamically insert & remove pages. - [x] Infinite scrolling support. @@ -25,26 +26,33 @@ - [x] Support for custom animated page transitions. ## 📋 Requirements -Pageboy requires iOS 12 / tvOS 12; and is compatible with Swift 5. + +Pageboy requires iOS 12 / tvOS 12; and is compatible with Swift 5/6. ## 📲 Installation ### Swift Package Manager + Pageboy is compatible with [Swift Package Manager](https://swift.org/package-manager) and can be integrated via Xcode. ### CocoaPods + Pageboy is also available through [CocoaPods](https://cocoapods.org): + ```ruby pod 'Pageboy', '~> 4.2' ``` ### Carthage + Pageboy is also available through [Carthage](https://github.com/Carthage/Carthage): + ```ogdl github "uias/Pageboy" ~> 4.2 ``` ## 🚀 Usage + - [The Basics](#the-basics) - [PageboyViewControllerDelegate](#pageboyViewControllerDelegate) - [Navigation](#navigation) @@ -52,20 +60,20 @@ github "uias/Pageboy" ~> 4.2 ### The Basics -1) Create an instance of a `PageboyViewController` and provide it with a `PageboyViewControllerDataSource`. +1. Create an instance of a `PageboyViewController` and provide it with a `PageboyViewControllerDataSource`. ```swift class PageViewController: PageboyViewController, PageboyViewControllerDataSource { override func viewDidLoad() { super.viewDidLoad() - + self.dataSource = self } } ``` -2) Implement the `PageboyViewControllerDataSource` functions. +2. Implement the `PageboyViewControllerDataSource` functions. ```swift func numberOfViewControllers(in pageboyViewController: PageboyViewController) -> Int { @@ -87,6 +95,7 @@ func defaultPage(for pageboyViewController: PageboyViewController) -> PageboyVie The delegate functions provided by a `PageboyViewController` are much more reliable and useful than what a raw `UIPageViewController` provides. You can use them to find out exactly where the current page is, and when it's moved, where it's headed. #### willScrollToPageAtIndex + About to embark on a transition to a new page. ```swift @@ -97,6 +106,7 @@ func pageboyViewController(_ pageboyViewController: PageboyViewController, ``` #### didScrollToPosition + Scrolled to a relative position along the way transitioning to a new page. ```swift @@ -107,6 +117,7 @@ func pageboyViewController(_ pageboyViewController: PageboyViewController, ``` #### didScrollToPage + Successfully completed a scroll transition to a page. ```swift @@ -117,6 +128,7 @@ func pageboyViewController(_ pageboyViewController: PageboyViewController, ``` #### didReload + Child view controllers have been reloaded. ```swift @@ -126,7 +138,9 @@ func pageboyViewController(_ pageboyViewController: PageboyViewController, ``` ### Navigation + You can navigate programmatically through a `PageboyViewController` using `scrollToPage()`: + ```swift pageViewController.scrollToPage(.next, animated: true) ``` @@ -135,6 +149,7 @@ pageViewController.scrollToPage(.next, animated: true) - Interactive scrolling can also be controlled with `.isScrollEnabled`. ### Insertion & Deletion + Pageboy provides the ability to insert and delete pages dynamically in the `PageboyViewController`. ```swift @@ -142,7 +157,7 @@ func insertPage(at index: PageIndex, then updateBehavior: PageUpdateBehavior) func deletePage(at index: PageIndex, then updateBehavior: PageUpdateBehavior) ``` -*This behaves similarly to the insertion of rows in `UITableView`, in the fact that you have to update the data source prior to calling any of the update functions.* +_This behaves similarly to the insertion of rows in `UITableView`, in the fact that you have to update the data source prior to calling any of the update functions._ **Example:** @@ -152,7 +167,7 @@ viewControllers.insert(UIViewController(), at: index) pageViewController.insertPage(at: index) ``` -*The default behavior after inserting or deleting a page is to scroll to the update location, this however can be configured by passing a `PageUpdateBehavior` value other than `.scrollToUpdate`.* +_The default behavior after inserting or deleting a page is to scroll to the update location, this however can be configured by passing a `PageUpdateBehavior` value other than `.scrollToUpdate`._ ## ⚡️ Other Extras @@ -164,15 +179,17 @@ pageViewController.insertPage(at: index) - `.parentPageboy` - Access the immediate parent `PageboyViewController` from any child view controller. ### Animated Transitions + Pageboy also provides custom transition support for **animated transitions**. This can be customized via the `.transition` property on `PageboyViewController`. ```swift pageboyViewController.transition = Transition(style: .push, duration: 1.0) ``` -*Note: By default this is set to `nil`, which uses the standard animation provided by `UIPageViewController`.* +_Note: By default this is set to `nil`, which uses the standard animation provided by `UIPageViewController`._ ### Auto Scrolling + `PageboyAutoScroller` is available to set up timer based automatic scrolling of the `PageboyViewController`: ```swift @@ -182,11 +199,14 @@ pageboyViewController.autoScroller.enable() Support for custom intermission duration and other scroll behaviors is also available. ## 👨🏻‍💻 About + - Created by [Merrick Sapsford](https://github.com/msaps) ([@MerrickSapsford](https://twitter.com/MerrickSapsford)) - Contributed to by a growing [list of others](https://github.com/uias/Pageboy/graphs/contributors). ## ❤️ Contributing + Bug reports and pull requests are welcome on GitHub at [https://github.com/uias/Pageboy](https://github.com/uias/Pageboy). ## 👮🏻‍♂️ License + The library is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). diff --git a/Sources/Examples.xcodeproj/project.pbxproj b/Sources/Examples.xcodeproj/project.pbxproj index ef35e47f..f9497559 100644 --- a/Sources/Examples.xcodeproj/project.pbxproj +++ b/Sources/Examples.xcodeproj/project.pbxproj @@ -299,7 +299,7 @@ attributes = { BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1200; - LastUpgradeCheck = 1530; + LastUpgradeCheck = 1600; ORGANIZATIONNAME = "UI At Six"; TargetAttributes = { 4614988E2531E7C700AE1B1B = { @@ -462,7 +462,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.uias.Pageboy.tvOS; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = "$(PB_TVOS_DEPLOYMENT_TARGET)"; }; @@ -490,7 +489,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.uias.Pageboy.tvOS; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = "$(PB_TVOS_DEPLOYMENT_TARGET)"; }; @@ -521,7 +519,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.uias.Pageboy.iOS; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,6"; }; name = Debug; @@ -550,7 +547,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.uias.Pageboy.iOS; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,6"; }; name = Release; @@ -614,7 +610,7 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TVOS_DEPLOYMENT_TARGET = "$(PB_TVOS_DEPLOYMENT_TARGET)"; }; name = Debug; @@ -671,7 +667,7 @@ SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TVOS_DEPLOYMENT_TARGET = "$(PB_TVOS_DEPLOYMENT_TARGET)"; VALIDATE_PRODUCT = YES; }; diff --git a/Sources/Examples.xcodeproj/xcshareddata/xcschemes/Example tvOS.xcscheme b/Sources/Examples.xcodeproj/xcshareddata/xcschemes/Example tvOS.xcscheme index 79081b91..86d83142 100644 --- a/Sources/Examples.xcodeproj/xcshareddata/xcschemes/Example tvOS.xcscheme +++ b/Sources/Examples.xcodeproj/xcshareddata/xcschemes/Example tvOS.xcscheme @@ -1,6 +1,6 @@ NavigationDirection { return forPosition(CGFloat(page), previous: CGFloat(previousPage)) @@ -68,7 +66,6 @@ internal extension NavigationDirection { } internal extension NavigationDirection { - func layoutNormalized(isRtL: Bool) -> NavigationDirection { guard isRtL else { return self diff --git a/Sources/Pageboy/Model/Page.swift b/Sources/Pageboy/Model/Page.swift index fcce434c..d8365280 100644 --- a/Sources/Pageboy/Model/Page.swift +++ b/Sources/Pageboy/Model/Page.swift @@ -21,6 +21,7 @@ extension PageboyViewController { /// - last: The last page. /// - at: A custom specified page index. // swiftlint:disable identifier_name + @MainActor public enum Page { case next case previous diff --git a/Sources/Pageboy/Protocols/PageboyViewControllerDataSource.swift b/Sources/Pageboy/Protocols/PageboyViewControllerDataSource.swift index d8776c4a..0c0d2ab1 100644 --- a/Sources/Pageboy/Protocols/PageboyViewControllerDataSource.swift +++ b/Sources/Pageboy/Protocols/PageboyViewControllerDataSource.swift @@ -8,8 +8,8 @@ import UIKit +@MainActor public protocol PageboyViewControllerDataSource: AnyObject { - /// The number of view controllers to display. /// /// - Parameter pageboyViewController: The Page view controller. diff --git a/Sources/Pageboy/Protocols/PageboyViewControllerDelegate.swift b/Sources/Pageboy/Protocols/PageboyViewControllerDelegate.swift index 03aeb300..928966e0 100644 --- a/Sources/Pageboy/Protocols/PageboyViewControllerDelegate.swift +++ b/Sources/Pageboy/Protocols/PageboyViewControllerDelegate.swift @@ -8,8 +8,8 @@ import UIKit +@MainActor public protocol PageboyViewControllerDelegate: AnyObject { - /// The page view controller will begin scrolling to a new page. /// /// - Parameters: diff --git a/Sources/Pageboy/Transitioning/TransitionOperation.swift b/Sources/Pageboy/Transitioning/TransitionOperation.swift index 221024b8..883cddba 100644 --- a/Sources/Pageboy/Transitioning/TransitionOperation.swift +++ b/Sources/Pageboy/Transitioning/TransitionOperation.swift @@ -8,8 +8,8 @@ import UIKit +@MainActor internal protocol TransitionOperationDelegate: AnyObject { - /// A transition operation did finish. /// /// - Parameters: @@ -28,6 +28,7 @@ internal protocol TransitionOperationDelegate: AnyObject { } /// An operation for performing a PageboyViewController transition +@MainActor internal class TransitionOperation: NSObject, CAAnimationDelegate { // MARK: Types @@ -125,14 +126,18 @@ internal class TransitionOperation: NSObject, CAAnimationDelegate { // MARK: CAAnimationDelegate - public func animationDidStart(_ anim: CAAnimation) { - isAnimating = true + public nonisolated func animationDidStart(_ anim: CAAnimation) { + Task { @MainActor in + isAnimating = true + } } - public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { - isAnimating = false - completion?(flag) - delegate?.transitionOperation(self, didFinish: flag) - animation = nil + public nonisolated func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { + Task { @MainActor in + isAnimating = false + completion?(flag) + delegate?.transitionOperation(self, didFinish: flag) + animation = nil + } } } diff --git a/Sources/Pageboy/UIViewController+Pageboy.swift b/Sources/Pageboy/UIViewController+Pageboy.swift index e8a9fb8a..5d804e54 100644 --- a/Sources/Pageboy/UIViewController+Pageboy.swift +++ b/Sources/Pageboy/UIViewController+Pageboy.swift @@ -9,15 +9,6 @@ import UIKit extension UIViewController { - - /// The parent PageboyViewController. - /// Available from any direct child view controllers within a PageboyViewController. - /// Deprecated in Pageboy 3.1.0. - @available(*, deprecated, message: "Use pageboyParent") - public var parentPageboy: PageboyViewController? { - return pageboyParent - } - /// The parent PageboyViewController. /// Available from any direct child view controllers within a PageboyViewController. public var pageboyParent: PageboyViewController? { diff --git a/Sources/PageboyTests/PageboyAutoScrollTests.swift b/Sources/PageboyTests/PageboyAutoScrollTests.swift index 8ddb4c94..89298903 100644 --- a/Sources/PageboyTests/PageboyAutoScrollTests.swift +++ b/Sources/PageboyTests/PageboyAutoScrollTests.swift @@ -9,7 +9,7 @@ import XCTest @testable import Pageboy -class PageboyAutoScrollTests: PageboyTests { +class PageboyAutoScrollTests: PageboyTestCase { var autoScrollExpectation: XCTestExpectation? diff --git a/Sources/PageboyTests/PageboyConfigurationTests.swift b/Sources/PageboyTests/PageboyConfigurationTests.swift index 7a021b9e..3b920c81 100644 --- a/Sources/PageboyTests/PageboyConfigurationTests.swift +++ b/Sources/PageboyTests/PageboyConfigurationTests.swift @@ -9,7 +9,7 @@ import XCTest @testable import Pageboy -class PageboyConfigurationTests: PageboyTests { +class PageboyConfigurationTests: PageboyTestCase { /// Test updating navigationOrientation updates pageViewController correctly. func testPageboyNavigationOrientationChange() { diff --git a/Sources/PageboyTests/PageboyDataSourceTests.swift b/Sources/PageboyTests/PageboyDataSourceTests.swift index 5a59d34c..4bae1eaf 100644 --- a/Sources/PageboyTests/PageboyDataSourceTests.swift +++ b/Sources/PageboyTests/PageboyDataSourceTests.swift @@ -9,7 +9,7 @@ import XCTest @testable import Pageboy -class PageboyDataSourceTests: PageboyTests { +class PageboyDataSourceTests: PageboyTestCase { /// Test loading view controllers from the data source. func testPageboyViewControllerValidSetUp() { diff --git a/Sources/PageboyTests/PageboyInsertionTests.swift b/Sources/PageboyTests/PageboyInsertionTests.swift index b28feb24..14014c5c 100644 --- a/Sources/PageboyTests/PageboyInsertionTests.swift +++ b/Sources/PageboyTests/PageboyInsertionTests.swift @@ -9,7 +9,7 @@ import XCTest @testable import Pageboy -class PageboyInsertionTests: PageboyTests { +class PageboyInsertionTests: PageboyTestCase { func testInsertPage() { let initialCount = 4 diff --git a/Sources/PageboyTests/PageboyPropertyTests.swift b/Sources/PageboyTests/PageboyPropertyTests.swift index bcce397f..42db3091 100644 --- a/Sources/PageboyTests/PageboyPropertyTests.swift +++ b/Sources/PageboyTests/PageboyPropertyTests.swift @@ -9,7 +9,7 @@ import XCTest @testable import Pageboy -class PageboyPropertyTests: PageboyTests { +class PageboyPropertyTests: PageboyTestCase { /// Test that currentViewController property returns correct view controller. func testCorrectCurrentViewControllerReported() { diff --git a/Sources/PageboyTests/PageboyTests.swift b/Sources/PageboyTests/PageboyTests.swift index dd098acf..86cc9c01 100644 --- a/Sources/PageboyTests/PageboyTests.swift +++ b/Sources/PageboyTests/PageboyTests.swift @@ -9,8 +9,8 @@ import XCTest @testable import Pageboy -class PageboyTests: XCTestCase { - +class PageboyTestCase: XCTestCase { + typealias AsyncTest = (@escaping TestCompletion) -> Void typealias TestCompletion = () -> Void diff --git a/Sources/PageboyTests/PageboyTransitionTests.swift b/Sources/PageboyTests/PageboyTransitionTests.swift index a4b31d13..9b0be944 100644 --- a/Sources/PageboyTests/PageboyTransitionTests.swift +++ b/Sources/PageboyTests/PageboyTransitionTests.swift @@ -9,7 +9,7 @@ import XCTest @testable import Pageboy -class PageboyTransitionTests: PageboyTests { +class PageboyTransitionTests: PageboyTestCase { /// Test transition to a valid custom PageIndex non-animated func testSuccessfulTransitionToCustomIndex() { diff --git a/Sources/iOS/AppDelegate.swift b/Sources/iOS/AppDelegate.swift index ce31a167..44f3c29a 100644 --- a/Sources/iOS/AppDelegate.swift +++ b/Sources/iOS/AppDelegate.swift @@ -9,7 +9,7 @@ import UIKit import Pageboy -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? @@ -29,11 +29,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { return true } -} -@available(iOS 13, *) -extension AppDelegate { - func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } diff --git a/Sources/iOS/SceneDelegate.swift b/Sources/iOS/SceneDelegate.swift index e1e58a86..d8ca0b12 100644 --- a/Sources/iOS/SceneDelegate.swift +++ b/Sources/iOS/SceneDelegate.swift @@ -9,8 +9,6 @@ import UIKit // swiftlint:disable weak_delegate - -@available(iOS 13, *) class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? @@ -34,9 +32,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { if let titlebar = windowScene.titlebar { titlebar.toolbar = toolbar - if #available(iOS 14.0, *) { - titlebar.toolbarStyle = .automatic - } + titlebar.toolbarStyle = .automatic } pageViewController.registerForNavigationNotifications() diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b4117ad7..1d836e27 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -7,7 +7,7 @@ platform :ios do desc "Run unit tests and check library" lane :test do - scan(workspace: "Pageboy.xcworkspace", scheme: "Pageboy iOS", clean: true) + scan(workspace: "Pageboy.xcworkspace", scheme: "Pageboy iOS", clean: true, device: "iPhone 15 (18.0)") pod_lib_lint(allow_warnings: true) end