This site has been permanently archived. The content on this site was last updated in 2019.
<GVRWidgetViewDelegate> Protocol
Defines a delegate for GVRWidgetView and its subclasses.
Inherits <UIViewNSObject>.
Called when the user taps the widget view.
This corresponds to the Cardboard viewer's trigger event.
- (void) widgetView: |
|
(GVRWidgetView *) |
widgetView |
didChangeDisplayMode: |
|
(GVRWidgetDisplayMode) |
displayMode |
|
|
| |
|
optional |
Called when the widget view's display mode changes.
See ::GVRWidgetDisplayMode.
- (void) widgetView: |
|
(GVRWidgetView *) |
widgetView |
didLoadContent: |
|
(id) |
content |
|
|
| |
|
optional |
Called when the content is successfully loaded.
- (void) widgetView: |
|
(GVRWidgetView *) |
widgetView |
didFailToLoadContent: |
|
(id) |
content |
withErrorMessage: |
|
(NSString *) |
errorMessage |
|
|
| |
|
optional |
Called when there is an error loading content in the widget view.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[null,null,["Last updated 2024-10-09 UTC."],[[["The `GVRWidgetViewDelegate` protocol defines methods to handle interactions and state changes for `GVRWidgetView` and its subclasses."],["It includes callbacks for user taps, display mode changes, content loading success, and content loading failures."],["The `widgetViewDidTap:` method is called when the user taps the widget, similar to the Cardboard viewer's trigger event."],["`widgetView:didChangeDisplayMode:` is triggered when the widget's display mode is altered."],["The protocol provides methods, `widgetView:didLoadContent:` and `widgetView:didFailToLoadContent:withErrorMessage:`, to inform the delegate about the status of content loading."]]],["The `GVRWidgetViewDelegate` protocol defines methods for managing a widget view. Key actions include: receiving user tap events via `widgetViewDidTap:`; tracking display mode changes with `widgetView:didChangeDisplayMode:`; confirming successful content loading through `widgetView:didLoadContent:`; and handling content loading errors using `widgetView:didFailToLoadContent:withErrorMessage:`. These optional methods are triggered by a `GVRWidgetView` instance, allowing for dynamic responses to user interactions and content states.\n"]]