HYPSnapshotContainer
@protocol HYPSnapshotContainer <NSObject>
The HYPSnapshotContainer provides a mechanism of displaying custom UI over a Snapshot of the current app. This allows the user to zoom on the app and inspect tiny details, but also prevents the user from interacting with the app. The HYPSnapshotContainer holds the HYPSnapshotPluginViewProvider’s view when a snapshot plugin becomes active. It also provides convenience methods for presenting common UI across the Snanshot plugin platform.
-
This presents a popover view controller with a list a views that intersect with the provided point. The views listed are in order of front to back.
Note: This is used to select views that are covered by other views. This is typically called after a long press gesture on a certain point, but it is up to the plugin to decide when to present this.
Declaration
Objective-C
- (void)presentViewListPopoverForPoint:(CGPoint)point delegate:(nullable id<HYPViewSelectionDelegate>) delegate;
Swift
func presentViewListPopover(for point: CGPoint, delegate: HYPViewSelectionDelegate?)
Parameters
point
The point at which the popover presents itself.
delegate
The delegate that notifies when a view has been selected.
-
This presents a popover containing the view controller provided.
Declaration
Objective-C
- (void)presentPopover:(id)popoverController recommendedHeight:(CGFloat)height forView:(id)view;
Swift
func presentPopover(_ popoverController: Any!, recommendedHeight height: CGFloat, forView view: Any!)
Parameters
popoverController
The view controller to display inside the popover.
height
The requested height to make the popover. This value caps out at 300.
view
The view at which the popover should present itself around.
-
This presents a popover containing the view controller provided.
Declaration
Objective-C
- (void)presentPopover:(id)popoverController recommendedHeight:(CGFloat)height atPosition:(CGPoint)point;
Swift
func presentPopover(_ popoverController: Any!, recommendedHeight height: CGFloat, atPosition point: CGPoint)
Parameters
popoverController
The view controller to display inside the popover.
height
The requested height to make the popover. This value caps out at 300.
point
The position at which the popover should present itself.
-
Dismisses the current popover if there is one.
Declaration
Objective-C
- (void)dismissCurrentPopover;
Swift
func dismissCurrentPopover()
-
Presents a view controller modally over the snapshot container.
Note: This is typically used when a popover does not provide enough real estate for the information being displayed.
Declaration
Objective-C
- (void)presentViewController:(id)controller animated:(_Bool)animated;
Swift
func presentViewController(_ controller: Any!, animated: Bool)
Parameters
controller
The ViewController to present modally.
animated
Whether or not the presentation is animated.
-
The current active plugin module.
Note: This can be set to nil to deactivate the current plugin.
Declaration
Objective-C
@property (assign, readwrite, nonatomic, nullable) id<HYPPluginModule, HYPSnapshotPluginViewProvider> overlayModule;