SubaioView

public class SubaioView : UIView

A view for showing subaio-content. Wraps a webview and handles communication with the embedded app, as well as interaction with the shared SubaioManager.

No SubaioViews should be created before SubaioManager.shared.configure has been invoked and SubaioManager.shared.language has been assigned.

  • Delegate for handling events.

    Declaration

    Swift

    public weak var delegate: SubaioViewDelegate?
  • 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 }
  • 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)

    Parameters

    page

    The page to load. The default Subaio page is Page(name: "OVERVIEW", params: nil). For convenience, this is available as Page.overview.

  • Initialize a view with a page.

    Declaration

    Swift

    public convenience init(frame: CGRect, page: Page)

    Parameters

    frame

    Initial frame

    page

    The page to load. The default Subaio page is Page(name: "OVERVIEW", params: nil). For convenience, this is available as Page.overview.

  • Initialize a view with a page.

    Declaration

    Swift

    public convenience init(page: Page, autosizeDefaultHeight: CGFloat)

    Parameters

    page

    The page to load. The default Subaio page is Page(name: "OVERVIEW", params: nil). For convenience, this is available as Page.overview.

    autosizeDefaultHeight

    Add a height-constraint to match the view content. Until the view has initialized, the constraint will match this height.

  • Initialize a view with a page.

    Declaration

    Swift

    public convenience init(frame: CGRect, page: Page, autosizeDefaultHeight: CGFloat)

    Parameters

    frame

    Initial frame

    page

    The page to load. The default Subaio page is Page(name: "OVERVIEW", params: nil). For convenience, this is available as Page.overview.

    autosizeDefaultHeight

    Add a height-constraint to match the view content. Until the view has initialized, the constraint will match this height.

  • Warning

    Not implemented

    Declaration

    Swift

    public required init?(coder aDecoder: NSCoder)
  • Undocumented

    Declaration

    Swift

    deinit
  • Undocumented

    Declaration

    Swift

    public override func didMoveToWindow()
  • 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)