Is it possible customize SFSafariViewController like:
- change "Share" button
- or add new button on same toolbar where "Share" and "Compass" buttons are
Any help will be appreciated.
No. However, you can change some specific configuration of that controller. Namely:
SFSafariViewControllerConfiguration
, you have barCollapsingEnabled
and entersReaderIfAvailable
.activityItemsForURL
and excludedActivityTypesForURL
.preferredBarTintColor
and dismissButtonStyle
, etc...Apple says:
Important
In accordance with App Store Review Guidelines, this view controller must be used to visibly present information to users; the controller may not be hidden or obscured by other views or layers. Additionally, an app may not use SFSafariViewController to track users without their knowledge and consent.
Lastly, indeed, you may use WKWebView
instead for further customisation of your screen.
If your app lets users view websites from anywhere on the Internet, use the SFSafariViewController class. If your app customizes, interacts with, or controls the display of web content, use the WKWebView class.
Read doc: https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller