<GVRWidgetViewDelegate> Protocol

  • 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.

<GVRWidgetViewDelegate> Protocol Reference

Overview

Defines a delegate for GVRWidgetView and its subclasses.

Inherits <UIViewNSObject>.

Instance Method Summary

(void) - widgetViewDidTap:
 Called when the user taps the widget view. More...
 
(void) - widgetView:didChangeDisplayMode:
 Called when the widget view's display mode changes. More...
 
(void) - widgetView:didLoadContent:
 Called when the content is successfully loaded. More...
 
(void) - widgetView:didFailToLoadContent:withErrorMessage:
 Called when there is an error loading content in the widget view. More...
 

Method Detail

- (void) widgetViewDidTap: (GVRWidgetView *)  widgetView
optional

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.