SFSafariViewControllerPresenter
public class SFSafariViewControllerPresenter : NSObject, SFSafariViewControllerPresenting, SFSafariViewControllerDelegate
Default implementation of SFSafariViewControllerPresenting
.
-
The presenter delegate.
Declaration
Swift
public weak var delegate: WebViewPresenterDelegate?
-
Safari view controller used by the load method that needs to load the url.
Declaration
Swift
public var safariViewController: SFSafariViewController?
-
The view controller used to present the navigation controller. By default it searches the topmost view controller automatically at the call of the property. It is also settable by the application it is necessary.
Declaration
Swift
public var webViewPresentingViewController: UIViewController? { get set }
-
Default implementation of
SFSafariViewControllerPresenting
.Declaration
Swift
public init(delegate: WebViewPresenterDelegate? = nil)
Parameters
delegate
The delegate instance.
-
Presents the web view and passes the instance in the completion handler.
Declaration
Swift
public func presentWebView(with url: URL, completionHandler: @escaping (SFSafariViewController?, Error?) -> Void)
Parameters
with
The initial url which will be loaded in the web view. Can not change later.
-
Dismisses the presented web view.
Declaration
Swift
public func dismissWebView()
-
Delegate callback called when the user taps the Done button. Upon this call, the view controller is dismissed modally.
Declaration
Swift
public func safariViewControllerDidFinish(_ controller: SFSafariViewController)