BridgeView
public class BridgeView : UIView
extension BridgeView: WKNavigationDelegate
extension BridgeView: WKScriptMessageHandler
A view for showing subaio-content. Wraps a webview and handles communication
with the embedded app, as well as interaction with the shared BridgeManager.
No BridgeViews should be created before BridgeManager.shared.configure has
been invoked and BridgeManager.shared.language has been assigned.
-
Delegate for handling events.
Declaration
Swift
public weak var delegate: BridgeViewDelegate? -
Sets the visibility of the horizontal scroll indicator
Declaration
Swift
public var showsHorizontalScrollIndicator: Bool { get set } -
Sets the visibility of the vertical scroll indicator
Declaration
Swift
public var showsVerticalScrollIndicator: Bool { get set } -
Controls whether the scroll view bounces past the edge of content and back again.
Declaration
Swift
public var bounces: Bool { get set } -
Status of the embedded app.
Declaration
Swift
public private(set) var status: ViewStatus { get } -
Initialize a view with a page.
Declaration
Swift
public convenience init(page: Page, reportResize: Bool = false, manager: BridgeManager = .shared)Parameters
pageThe page to load. The default Subaio page is
Page(name: "OVERVIEW", params: nil). For convenience, this is available asPage.overview.managerOptionally inject an instance of BridgeManager. Defaults to the shared manager instance.
-
Initialize a view with a page.
Declaration
Swift
public init(frame: CGRect, page: Page, reportResize: Bool = false, manager: BridgeManager = .shared)Parameters
frameInitial frame
pageThe page to load. The default Subaio page is
Page(name: "OVERVIEW", params: nil). For convenience, this is available asPage.overview.managerOptionally inject an instance of BridgeManager. Defaults to the shared manager instance.
-
Warning
Not implementedDeclaration
Swift
public required init?(coder aDecoder: NSCoder) -
Undocumented
Declaration
Swift
public override func didMoveToWindow() -
Undocumented
Declaration
Swift
public func sendCustomAction(name: String, data: Any? = nil) -
Undocumented
Declaration
Swift
public override func layoutSubviews() -
Reload the underlying webview
Declaration
Swift
public func refresh() -
Undocumented
Declaration
Swift
public func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) -
Undocumented
Declaration
Swift
public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -
Undocumented
Declaration
Swift
public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage)
BridgeView Class Reference