Added more options for sliding operation #124
Closed
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.
Wanted to add a few more options to the way the center view controller and side menus slide past one another. Here's a breakdown of what's different:
menuSlideAnimationEnabled
andmenuSlideAnimationFactor
properties. They still work, but there will be some unclear results from mixing new and old properties, so they're marked as depreciated and will throw a warning if used.setControllerOffset
. An offset of 0 means closed, negative would open the right menu, and positive would open the left menu. All three views are positioned from this view so that there is no need for methods aligning views to one another.showMenuOverContent
property that allows the menus to slide in front of the center view controller. The default is still to slide behind the center.menuParallaxFactor
property to control the amount of sliding of the side menus. A factor of 0 would leave the menu stationary (default behavior), a factor of 1 would slide the menu directly with the center (like a UIPageViewController), and a factor between 0 and 1 would slide the menu at a different speed from the center, giving it a parallax scrolling effect. This is only utilized when menus are behind the center view.contentParallaxFactor
property to control the amount of sliding of the center view. The values go from 0 to 1 and work as described for themenuParallaxFactor
. This is only utilized when menus are in front of the center view.menuScaleFactor
property to control the size of the side menus as they slide in. For example, with a factor of 0.9, the side menu will be 90% of full size when sliding begins, then grow to fill the entire size when the menu is open. This is only utilized when menus are behind the center view.contentScaleFactor
property to control the size of the center view as it slides out. For example, with a factor of 0.9, the center view will be full size when sliding begins, then shrink to 90% when the menu is open. This is only utilized when menus are in front of the center view.I realize that this is a pretty major change and that there is a lot of code that is being modified. Take a look through it and let me know what you think.
(Go Badgers!)