Content Widget Delegate

Overview


A delegate to handle Content Widget actions.

Declared In

SNRContentWidget.h

Declaration

NS_SWIFT_NAME(ContentWidgetDelegate)
@protocol SNRContentWidgetDelegate

Methods


This method is called after a widget is loaded.

func snr_widgetDidLoad(widget: ContentWidget) -> Void

Parameter Type Description
widget ContentWidget The widget instance that called the delegate method.

This method is called when an error occurs while loading a widget.

func snr_widgetDidNotLoad(widget:ContentWidget error: Error) -> Void

Parameter Type Description
widget ContentWidget The widget instance that called the delegate method.
error NSError The error that occurred.

This method is called when the user clicks a widget’s item.

func snr_widgetDidReceiveClickAction(widget:ContentWidget model: BaseModel) -> Void

Parameter Type Description
widget ContentWidget The widget instance that called the delegate method.
model BaseModel The model’s object that was clicked.

This method is called when the widget’s loading state changes.

func snr_widgetIsLoading(widget: ContentWidget isLoading: Bool) -> Void

Parameter Type Description
widget ContentWidget The widget instance that called the delegate method.
isLoading Bool Widget’s loading state.

This method is called when the widget’s size changes.

func snr_widgetDidChangeSize(widget: ContentWidget size: CGSize) -> Void

Parameter Type Description
widget ContentWidget The widget instance that called the delegate method.
size CGSize Widget’s new size.
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker