This site has been permanently archived. The content on this site was last updated in 2019.
<GVRWidgetViewDelegate> Protocol
Stay organized with collections
Save and categorize content based on your preferences.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGVRWidgetViewDelegate\u003c/code\u003e protocol defines methods to handle interactions and state changes for \u003ccode\u003eGVRWidgetView\u003c/code\u003e and its subclasses.\u003c/p\u003e\n"],["\u003cp\u003eIt includes callbacks for user taps, display mode changes, content loading success, and content loading failures.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewidgetViewDidTap:\u003c/code\u003e method is called when the user taps the widget, similar to the Cardboard viewer's trigger event.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ewidgetView:didChangeDisplayMode:\u003c/code\u003e is triggered when the widget's display mode is altered.\u003c/p\u003e\n"],["\u003cp\u003eThe protocol provides methods, \u003ccode\u003ewidgetView:didLoadContent:\u003c/code\u003e and \u003ccode\u003ewidgetView:didFailToLoadContent:withErrorMessage:\u003c/code\u003e, to inform the delegate about the status of content loading.\u003c/p\u003e\n"]]],["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"],null,["# <GVRWidgetViewDelegate> Protocol\n\n[Instance Methods](#pub-methods) \n\\\u003cGVRWidgetViewDelegate\\\u003e Protocol Reference \n\nOverview\n--------\n\nDefines a delegate for [GVRWidgetView](/vr/ios/reference/interface_g_v_r_widget_view \"Defines a base class for all widget views, that encapsulates common functionality. \") and its subclasses.\n\nInherits \\\u003cUIViewNSObject\\\u003e.\n\n|--------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (void) | - [widgetViewDidTap:](/vr/ios/reference/protocol_g_v_r_widget_view_delegate-p#a0e8c30fc0bfbb2a0120c486c5efef07a) |\n| | Called when the user taps the widget view. [More...](#a0e8c30fc0bfbb2a0120c486c5efef07a) |\n| ||\n| (void) | - [widgetView:didChangeDisplayMode:](/vr/ios/reference/protocol_g_v_r_widget_view_delegate-p#a4098ca7bdc147286cebfa9026d4194b2) |\n| | Called when the widget view's display mode changes. [More...](#a4098ca7bdc147286cebfa9026d4194b2) |\n| ||\n| (void) | - [widgetView:didLoadContent:](/vr/ios/reference/protocol_g_v_r_widget_view_delegate-p#a5da4c365841b43bb172c516d3d7ac2ac) |\n| | Called when the content is successfully loaded. [More...](#a5da4c365841b43bb172c516d3d7ac2ac) |\n| ||\n| (void) | - [widgetView:didFailToLoadContent:withErrorMessage:](/vr/ios/reference/protocol_g_v_r_widget_view_delegate-p#a021191cfffe2f65715697586fe398209) |\n| | Called when there is an error loading content in the widget view. [More...](#a021191cfffe2f65715697586fe398209) |\n| ||\n\nMethod Detail\n-------------\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |----------------------------|---|---------------------------------------------------------------------|--------------|---| | - (void) widgetViewDidTap: | | ([GVRWidgetView](/vr/ios/reference/interface_g_v_r_widget_view) \\*) | *widgetView* | | | optional |\n\nCalled when the user taps the widget view.\n\nThis corresponds to the Cardboard viewer's trigger event. \n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |-----------------------|---|---------------------------------------------------------------------|---------------| | - (void) widgetView: | | ([GVRWidgetView](/vr/ios/reference/interface_g_v_r_widget_view) \\*) | *widgetView* | | didChangeDisplayMode: | | (GVRWidgetDisplayMode) | *displayMode* | | | | | | | optional |\n\nCalled when the widget view's display mode changes.\n\nSee ::GVRWidgetDisplayMode. \n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |----------------------|---|---------------------------------------------------------------------|--------------| | - (void) widgetView: | | ([GVRWidgetView](/vr/ios/reference/interface_g_v_r_widget_view) \\*) | *widgetView* | | didLoadContent: | | (id) | *content* | | | | | | | optional |\n\nCalled when the content is successfully loaded. \n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| |-----------------------|---|---------------------------------------------------------------------|----------------| | - (void) widgetView: | | ([GVRWidgetView](/vr/ios/reference/interface_g_v_r_widget_view) \\*) | *widgetView* | | didFailToLoadContent: | | (id) | *content* | | withErrorMessage: | | (NSString \\*) | *errorMessage* | | | | | | | optional |\n\nCalled when there is an error loading content in the widget view."]]