DisplayWebViewPresenter
public class DisplayWebViewPresenter : NSObject
extension DisplayWebViewPresenter: DisplayAgentDelegate
extension DisplayWebViewPresenter: WKNavigationDelegate
DisplayWebViewPresenter is a class which helps user for displaying DisplayWebView more easily.
-
Initialize with superView
Declaration
Swift
public convenience init(superView: UIView, nuguClient: NuguClient, clientInfo: [String : String]? = nil)
Parameters
superView
Target view for NuguDisplayWebView should be added to.
nuguClient
NuguClient instance which should be passed for delegation.
clientInfo
Optional and additional values which can be injected for pre-promised and customized layout.
-
Initialize with viewController
Declaration
Swift
public convenience init(viewController: UIViewController, nuguClient: NuguClient, clientInfo: [String : String]? = nil)
Parameters
viewController
Target viewController for NuguDisplayWebView should be added to.
nuguClient
NuguClient instance which should be passed for delegation.
clientInfo
Optional and additional values which can be injected for pre-promised and customized layout.
-
Declaration
Swift
public func displayAgentRequestContext(templateId: String, completion: @escaping (DisplayContext?) -> Void)
-
Declaration
Swift
public func displayAgentShouldRender(template: DisplayTemplate, completion: @escaping (AnyObject?) -> Void)
-
Declaration
Swift
public func displayAgentShouldUpdate(templateId: String, template: DisplayTemplate)
-
Declaration
Swift
public func displayAgentDidClear(templateId: String)
-
Declaration
Swift
public func displayAgentShouldMoveFocus(templateId: String, direction: DisplayControlPayload.Direction, header: Downstream.Header, completion: @escaping (Bool) -> Void)
-
Declaration
Swift
public func displayAgentShouldScroll(templateId: String, direction: DisplayControlPayload.Direction, header: Downstream.Header, completion: @escaping (Bool) -> Void)