Skip to content

Commit a202357

Browse files
committed
Added documentation for IASKAppSettingsWebViewController
See: #504
1 parent 01f00e1 commit a202357

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ IASK not only replicates the feature set of system settings but supports a large
2525
- [Custom inApp plists](#custom-inapp-plists)
2626
- [Privacy link](#privacy-link)
2727
- [Open URL](#open-url)
28+
- [Web View Controller](#web-view-controller)
2829
- [Mail Composer](#mail-composer)
2930
- [Button](#button)
3031
- [Multiline Text View](#multiline-text-view)
@@ -202,6 +203,32 @@ The [sample application](#sample-application) defines `NSMicrophoneUsageDescript
202203
InAppSettingsKit adds a new element `IASKOpenURLSpecifier` that allows to open a specified URL using an external application (i.e. Safari or Mail). The URL to launch is specified in the `File` parameter. See the sample `Root.inApp.plist` for details.
203204
204205
206+
## Web View Controller
207+
To open a specified URL inside your application, `IASKAppSettingsWebViewController` displays a fullscreen View Controller with an embedded [`WKWebView`](https://developer.apple.com/documentation/webkit/wkwebview).
208+
By default is shows an indeterminate activity indicator on the right side of the Navigation Bar when a page is loading.
209+
210+
The Web View Controller can be defined in the Settings plist by using the following mandatory IASKSpecifier properties:
211+
212+
- `Type`: set to `PSChildPaneSpecifier`
213+
- `IASKViewControllerClass`: set to `IASKAppSettingsWebViewController`
214+
- `IASKViewControllerSelector`: set to `initWithFile:specifier:`
215+
- `Title`: the localized title of the row
216+
- `File`: corresponds to the URL you want to load (e.g. "https://www.futuretap.com")
217+
218+
Use the following optional IASKSpecifier properties to customize the Web View Controller:
219+
220+
- `IASKWebViewShowProgress`: set to `YES` to replace the default activity indicator on the Navigation Bar by a progress bar just below the Navigation Bar, which dynamically updates according to the [`estimatedProgress`](https://developer.apple.com/documentation/webkit/wkwebview/1415007-estimatedprogress) property of [`WKWebView`](https://developer.apple.com/documentation/webkit/wkwebview).
221+
The progress bar will be removed when page loading completes.
222+
- `IASKWebViewShowNavigationalButtons`: set to `YES` to show navigational buttons on the right side of the Navigation Bar. Their enable state will update dynamically based on the navigation history of the [`WKWebView`](https://developer.apple.com/documentation/webkit/wkwebview).
223+
- `IASKWebViewHideBottomBar`: set to `YES` to hide the toolbar at the bottom of the screen when the `IASKAppSettingsWebViewController` is pushed on to a navigation controller. This will present the [`WKWebView`](https://developer.apple.com/documentation/webkit/wkwebview) full screen and prevents situations where the user can navigate the tab bar while the `IASKAppSettingsWebViewController` stays still present.
224+
This setting is ignored when the `IASKAppSettingsWebViewController` is presented modally.
225+
226+
For more details, open the [Sample application](#sample-application) and take a look at all rows that start with **WebView**.
227+
228+
Although `IASKAppSettingsWebViewController` might look similar to [`SFSafariViewController`](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller), the big difference is that `IASKAppSettingsWebViewController` does not reveal the URL to the user, nor can it be opened in an external browser (i.e. Safari or Chrome).
229+
In other words, it keeps your source private.
230+
231+
205232
## Mail Composer
206233
The custom `IASKMailComposeSpecifier` element allows to send mail from within the app by opening a mail compose view. You can set the following (optional) parameters using the settings plist: `IASKMailComposeToRecipents`, `IASKMailComposeCcRecipents`, `IASKMailComposeBccRecipents`, `IASKMailComposeSubject`, `IASKMailComposeBody`, `IASKMailComposeBodyIsHTML`. Optionally, you can implement
207234

0 commit comments

Comments
 (0)