MSDynamicsDrawerStyler Protocol Reference
Conforms to | NSObject |
Declared in | MSDynamicsDrawerStyler.h |
Overview
MSDynamicsDrawerStyler
is a protocol that defines the interface for an object that can style a MSDynamicsDrawerViewController
. Instances of MSDynamicsDrawerStyler
are added to MSDynamicsDrawerViewController
via the addStyler:forDirection:
method.
Creating a Custom Styler
As user interacts with the instance of MSDynamicsDrawerViewController
, the styler class is messaged via the method dynamicsDrawerViewController:didUpdatePaneClosedFraction:forDirection:
, which allows the styler to changes attributes of the drawerView
or paneView
relative to the paneClosedFraction
.
It’s recommended that custom stylers don’t change the frame
attribute of the paneView
or the drawerView
on the MSDynamicsDrawerViewController
instance. These are constantly modified both by the user’s gestures and the internal UIKit Dynamics within MSDynamicsDrawerViewController
. The behavior of MSDynamicsDrawerViewController
when the frame is externally modified is undefined.
Tasks
-
+ styler
Creates and returns a styler with default configuration.
required method -
– dynamicsDrawerViewController:didUpdatePaneClosedFraction:forDirection:
Invoked when the
required methodMSDynamicsDrawerViewController
has an update to its pane closed fraction. -
– stylerWasAddedToDynamicsDrawerViewController:
Used to set up the appearance of the styler when it is added to a
MSDynamicsDrawerViewController
instance. -
– stylerWasRemovedFromDynamicsDrawerViewController:
Used to tear down the appearance of the styler when it is removed from a
MSDynamicsDrawerViewController
instance.
Instance Methods
dynamicsDrawerViewController:didUpdatePaneClosedFraction:forDirection:
Invoked when the MSDynamicsDrawerViewController
has an update to its pane closed fraction.
- (void)dynamicsDrawerViewController:(MSDynamicsDrawerViewController *)dynamicsDrawerViewController didUpdatePaneClosedFraction:(CGFloat)paneClosedFraction forDirection:(MSDynamicsDrawerDirection)direction
Parameters
- dynamicsDrawerViewController
The
MSDynamicsDrawerViewController
that is being styled by theMSDynamicsDrawerStyler
instance.
- paneClosedFraction
The fraction that
MSDynamicsDrawerViewController
instance’s pane is closed.1.0
when closed,0.0
when opened.
- direction
The direction that the
MSDynamicsDrawerViewController
instance is opening in. Will not be masked.
Declared In
MSDynamicsDrawerStyler.h
stylerWasAddedToDynamicsDrawerViewController:
Used to set up the appearance of the styler when it is added to a MSDynamicsDrawerViewController
instance.
- (void)stylerWasAddedToDynamicsDrawerViewController:(MSDynamicsDrawerViewController *)dynamicsDrawerViewController
Parameters
- dynamicsDrawerViewController
The
MSDynamicsDrawerViewController
that is now being styled by theMSDynamicsDrawerStyler
instance.
Declared In
MSDynamicsDrawerStyler.h
stylerWasRemovedFromDynamicsDrawerViewController:
Used to tear down the appearance of the styler when it is removed from a MSDynamicsDrawerViewController
instance.
- (void)stylerWasRemovedFromDynamicsDrawerViewController:(MSDynamicsDrawerViewController *)dynamicsDrawerViewController
Parameters
- dynamicsDrawerViewController
The
MSDynamicsDrawerViewController
that was being styled by theMSDynamicsDrawerStyler
instance.
Declared In
MSDynamicsDrawerStyler.h