Package apple.safariservices.protocol
Interface SFSafariViewControllerDelegate
-
public interface SFSafariViewControllerDelegate
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default NSArray<? extends UIActivity>safariViewControllerActivityItemsForURLTitle(SFSafariViewController controller, NSURL URL, java.lang.String title)Called when the view controller is about to show UIActivityViewController after the user taps the action button.default voidsafariViewControllerDidCompleteInitialLoad(SFSafariViewController controller, boolean didLoadSuccessfully)Invoked when the initial URL load is complete.default voidsafariViewControllerDidFinish(SFSafariViewController controller)Delegate callback called when the user taps the Done button.default NSArray<java.lang.String>safariViewControllerExcludedActivityTypesForURLTitle(SFSafariViewController controller, NSURL URL, java.lang.String title)Allows you to exclude certain UIActivityTypes from the UIActivityViewController presented when the user taps the action button.default voidsafariViewControllerInitialLoadDidRedirectToURL(SFSafariViewController controller, NSURL URL)Called when the browser is redirected to another URL while loading the initial page.default voidsafariViewControllerWillOpenInBrowser(SFSafariViewController controller)Called when the user opens the current page in the default browser by tapping the toolbar button.
-
-
-
Method Detail
-
safariViewControllerActivityItemsForURLTitle
default NSArray<? extends UIActivity> safariViewControllerActivityItemsForURLTitle(SFSafariViewController controller, NSURL URL, java.lang.String title)
Called when the view controller is about to show UIActivityViewController after the user taps the action button.- Parameters:
URL- the URL of the web page.title- the title of the web page.- Returns:
- Returns an array of UIActivity instances that will be appended to UIActivityViewController.
-
safariViewControllerDidCompleteInitialLoad
default void safariViewControllerDidCompleteInitialLoad(SFSafariViewController controller, boolean didLoadSuccessfully)
Invoked when the initial URL load is complete. This method is invoked when SFSafariViewController completes the loading of the URL that you pass to its initializer. It is not invoked for any subsequent page loads in the same SFSafariViewController instance.- Parameters:
didLoadSuccessfully- YES if loading completed successfully, NO if loading failed.
-
safariViewControllerDidFinish
default void safariViewControllerDidFinish(SFSafariViewController controller)
Delegate callback called when the user taps the Done button. Upon this call, the view controller is dismissed modally.
-
safariViewControllerExcludedActivityTypesForURLTitle
default NSArray<java.lang.String> safariViewControllerExcludedActivityTypesForURLTitle(SFSafariViewController controller, NSURL URL, java.lang.String title)
Allows you to exclude certain UIActivityTypes from the UIActivityViewController presented when the user taps the action button. Called when the view controller is about to show a UIActivityViewController after the user taps the action button.- Parameters:
URL- the URL of the current web page.title- the title of the current web page.- Returns:
- Returns an array of any UIActivityType that you want to be excluded from the UIActivityViewController.
-
safariViewControllerInitialLoadDidRedirectToURL
default void safariViewControllerInitialLoadDidRedirectToURL(SFSafariViewController controller, NSURL URL)
Called when the browser is redirected to another URL while loading the initial page. This method may be called even after -safariViewController:didCompleteInitialLoad: if the web page performs additional redirects without user interaction.- Parameters:
URL- The new URL to which the browser was redirected.
-
safariViewControllerWillOpenInBrowser
default void safariViewControllerWillOpenInBrowser(SFSafariViewController controller)
Called when the user opens the current page in the default browser by tapping the toolbar button.
-
-