HYPSnapshotPluginViewProvider
@protocol HYPSnapshotPluginViewProvider
The HYPSnapshotPluginViewProvider protocol defines a mechanism for requesting the view that is placed ontop of the app when a snap shot plugin becomes active.
-
This gets called when the plugin view should activate in the provided context. Simply add your plugin interation view as a subview to the provided context.
Note: Contexts are changed each plugin activation.
Declaration
Objective-C
- (void)activateSnapshotPluginViewWithContext:(id)context;
Swift
func activateSnapshotPluginView(withContext context: Any!)
Parameters
context
The provided view the plugin interaction view should be added to.
-
This is called when the plugin deactivates. This provided opportunity to clean up as needed.
Declaration
Objective-C
- (void)deactivateSnapshotPluginView;
Swift
func deactivateSnapshotPluginView()
-
Called when the context the plugin view is in is about to change size.
Declaration
Objective-C
- (void)snapshotContextWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id _Nullable)coordinator;
Swift
optional func snapshotContextWillTransition(to size: CGSize, withTransitionCoordinator coordinator: Any?)
Parameters
size
The size that the context is about to change to.
coordinator
The transition coordinator allows you to animate views in sync with the size change.
-
Called when the context has changed size.
Declaration
Objective-C
- (void)snapshotContextDidTransitionToSize:(CGSize)size;
Swift
optional func snapshotContextDidTransition(to size: CGSize)
Parameters
size
The size that the plugin view has changed to.