SubaioViewDelegate
public protocol SubaioViewDelegate : AnyObject
Event-handlers for SubaioView.
-
Called whenever the view attempts to navigate to another page.
Should likely be handled by pushing a new view-controller wrapping a
SubaioViewto the navigation-stack.Declaration
Swift
func subaioView(_ subaioView: SubaioView, navigatedTo page: Page)Parameters
subaioViewCalling view.
pagePage to navigate to.
-
Called whenever the view attempts to go back.
Should likely be handled by popping the current view-controller from the stack.
Declaration
Swift
func subaioViewDidSelectBack(_ subaioView: SubaioView)Parameters
subaioViewCalling view.
-
Called whenever the view changes status. It is not necessary to react to this.
Can be used to implement a custom loading-screen by hiding the loading-screen and showing the view on a change to
runningorerrored.Can be used to implement a custom error-screen by hiding the view and showing an error page on a change to
errored.Declaration
Swift
func subaioView(_ subaioView: SubaioView, changedStatusTo status: ViewStatus)Parameters
subaioViewCalling view.
statusNew status of the view.
-
Called whenever the view changes title.
If a host-application controlled title-bar is used, this text should be shown there.
Declaration
Swift
func subaioView(_ subaioView: SubaioView, updatedTitleTo title: String)Parameters
subaioViewCalling view.
titleTitle of the view.
-
Called whenever the view receives an error.
noTemplateandviewTimedOutshould be handled by showing an error page.Declaration
Swift
func subaioView(_ subaioView: SubaioView, didReceiveError error: SubaioError)Parameters
subaioViewCalling view.
errorThe error that the view received.
-
Called whenever the user of the view attempts to share.
Should likely present a
UIActivityViewController, like so:func subaioView(_ subaioView: SubaioView, isAttemptingToShare items: [Any]) { let activityViewController = UIActivityViewController(activityItems: items, applicationActivities: nil) self.present(activityViewController, animated: true, completion: nil) }Declaration
Swift
func subaioView(_ subaioView: SubaioView, isAttemptingToShare items: [Any])Parameters
subaioViewCalling view.
itemItem to be shared.
SubaioViewDelegate Protocol Reference