Skip to content
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

Pulley 2.5 Migration Issue/Question Thread #252

Open
amyleecodes opened this issue Aug 29, 2018 · 0 comments
Open

Pulley 2.5 Migration Issue/Question Thread #252

amyleecodes opened this issue Aug 29, 2018 · 0 comments

Comments

@amyleecodes
Copy link
Contributor

amyleecodes commented Aug 29, 2018

Pulley 2.5.0 involved a lot of name changes for structures and properties. This document outlines the renaming / changes / new features.

  • PulleyDisplayMode.leftSide -> PulleyDisplayMode.panel
  • PulleyDisplayMode.bottomDrawer -> PulleyDisplayMode.drawer
  • topInset -> drawerTopInset
  • panelInsetTop -> panelInsets.top (is now a part of a UIEdgeInsets struct)
  • panelInsetLeft -> panelInsets.left (is now a part of a UIEdgeInsets struct)

These changes were required in order to support the following new features:

  • Pulley will now use the drawerViewController's view.layer.mask (if it's a CAShapeLayer) to mask the drawer itself. This allows for custom drawer shapes. If you choose to use this, it will ignore the drawer corner radius setting as you'll be providing the mask layer yourself. See the flag in the example project (near the top of DrawerContentViewController) if you'd like to see the effect.
  • Pulley now supports panel positions other than left side. As a result, this has been renamed to 'panel' and a new panelCornerPlacement property has been added. This will allow you to specify a corner to put the panel in.
  • In order to better support the panelCornerPlacement property, the panelInsetTop property was changed to a panelInsets property that is a UIEdgeInsets struct. This allows you to control spacing from any edge of the display (based on what's needed for the corner you've chosen).
  • This release has better support for safe areas in the panel display mode and the sample project has been updated with better safe area math for positions in panel mode.

Tip: The move to using UIEdgeInsets + Custom Masks + Custom Corners opens up the opportunity to make 'docked' menus that are attached to the edge of the screen when using panel mode. The effect is similar to a bottom drawer that only takes up a small portion of the screen an is inset from the left/right of the screen.

If you have any questions, please post below and I'll try to help you as quickly as possible. I apologize for the need to do some name migration, but it was unfortunately necessary. Thanks to everyone who worked on the features in this release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants