-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 3.0 #537
Merged
Merged
Version 3.0 #537
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The implementation is split into two classes, PageViewController and PageViewManager. PageViewManager is responsible for all the logic related to adding/removing view controllers and calling the correct appearance transitions, while PageViewController is responsible for updating the UIScrollView.
Adds another flag to the layoutViews method so we can opt-out of accounting for the current content offset when rotating.
Make sure viewWillAppear, viewDidAppear, viewWillDisappear and viewDidDisappear is forwarded to the selected view controller and include the correct animated flag.
Moves the PageViewManager configuration to the initializers to ensure that we handle the selectViewController method if it's called before viewDidLoad has been triggered.
Ideally we would keep these private, but the current implementation exposes them so it better not to break existing apps.
Custom page view controller
PagingDistance is responsible for calculating the distance that the collection view has to travel when selecting an item. This is used to ensure a smooth transition. This commit refactors the calculation to work with both vertical and horizontal layouts and introduces unit tests for the most of the possible cases.
Add support calculating vertical distances
…t-tests Add unit tests for PagingCollectionViewLayout
Fix build error due to missing imports
The previous implementation was already using open, so we need to keep it open in order to prevent breaking existing apps that rely on this.
Make PageViewControllerDataSource/Delegate methods open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
This version introduces some breaking changes. More details about the release can be found here: #452.