Skip to content

Commit 25eaa53

Browse files
committed
2 parents fbfaf8c + a202357 commit 25eaa53

File tree

9 files changed

+734
-116
lines changed

9 files changed

+734
-116
lines changed

InAppSettingsKitSampleApp/Settings.bundle/Root.inApp.plist

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,74 @@
308308
<key>IASKChildTitle</key>
309309
<string></string>
310310
</dict>
311+
<dict>
312+
<key>File</key>
313+
<string>settings_about.html</string>
314+
<key>IASKViewControllerClass</key>
315+
<string>IASKAppSettingsWebViewController</string>
316+
<key>IASKViewControllerSelector</key>
317+
<string>initWithFile:specifier:</string>
318+
<key>Title</key>
319+
<string>WebView without tab bar (when pushed)</string>
320+
<key>IASKSubtitle</key>
321+
<string>use IASKWebViewHideBottomBar</string>
322+
<key>Type</key>
323+
<string>PSChildPaneSpecifier</string>
324+
<key>IASKChildTitle</key>
325+
<string>ABOUT_TITLE</string>
326+
<key>IASKWebViewHideBottomBar</key>
327+
<true/>
328+
</dict>
329+
<dict>
330+
<key>File</key>
331+
<string>https://www.futuretap.com</string>
332+
<key>IASKViewControllerClass</key>
333+
<string>IASKAppSettingsWebViewController</string>
334+
<key>IASKViewControllerSelector</key>
335+
<string>initWithFile:specifier:</string>
336+
<key>Title</key>
337+
<string>WebView with progress bar</string>
338+
<key>IASKSubtitle</key>
339+
<string>use IASKWebViewShowProgress</string>
340+
<key>Type</key>
341+
<string>PSChildPaneSpecifier</string>
342+
<key>IASKWebViewShowProgress</key>
343+
<true/>
344+
</dict>
345+
<dict>
346+
<key>File</key>
347+
<string>https://www.futuretap.com</string>
348+
<key>IASKViewControllerClass</key>
349+
<string>IASKAppSettingsWebViewController</string>
350+
<key>IASKViewControllerSelector</key>
351+
<string>initWithFile:specifier:</string>
352+
<key>Title</key>
353+
<string>WebView with navigational buttons</string>
354+
<key>IASKSubtitle</key>
355+
<string>use IASKWebViewShowNavigationalButtons</string>
356+
<key>Type</key>
357+
<string>PSChildPaneSpecifier</string>
358+
<key>IASKWebViewShowNavigationalButtons</key>
359+
<true/>
360+
</dict>
361+
<dict>
362+
<key>File</key>
363+
<string>https://www.futuretap.com</string>
364+
<key>IASKViewControllerClass</key>
365+
<string>IASKAppSettingsWebViewController</string>
366+
<key>IASKViewControllerSelector</key>
367+
<string>initWithFile:specifier:</string>
368+
<key>Title</key>
369+
<string>WebView with all the above options</string>
370+
<key>Type</key>
371+
<string>PSChildPaneSpecifier</string>
372+
<key>IASKWebViewShowNavigationalButtons</key>
373+
<true/>
374+
<key>IASKWebViewShowProgress</key>
375+
<true/>
376+
<key>IASKWebViewHideBottomBar</key>
377+
<true/>
378+
</dict>
311379
<dict>
312380
<key>Title</key>
313381
<string>TextField</string>

InAppSettingsKitSampleApp/Settings.bundle/Root~ipad.inApp.plist

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,74 @@
320320
<key>IASKChildTitle</key>
321321
<string>ABOUT_TITLE</string>
322322
</dict>
323+
<dict>
324+
<key>File</key>
325+
<string>settings_about.html</string>
326+
<key>IASKViewControllerClass</key>
327+
<string>IASKAppSettingsWebViewController</string>
328+
<key>IASKViewControllerSelector</key>
329+
<string>initWithFile:specifier:</string>
330+
<key>Title</key>
331+
<string>WebView without tab bar (when pushed)</string>
332+
<key>IASKSubtitle</key>
333+
<string>use IASKWebViewHideBottomBar</string>
334+
<key>Type</key>
335+
<string>PSChildPaneSpecifier</string>
336+
<key>IASKChildTitle</key>
337+
<string>ABOUT_TITLE</string>
338+
<key>IASKWebViewHideBottomBar</key>
339+
<true/>
340+
</dict>
341+
<dict>
342+
<key>File</key>
343+
<string>https://www.futuretap.com</string>
344+
<key>IASKViewControllerClass</key>
345+
<string>IASKAppSettingsWebViewController</string>
346+
<key>IASKViewControllerSelector</key>
347+
<string>initWithFile:specifier:</string>
348+
<key>Title</key>
349+
<string>WebView with progress bar</string>
350+
<key>IASKSubtitle</key>
351+
<string>use IASKWebViewShowProgress</string>
352+
<key>Type</key>
353+
<string>PSChildPaneSpecifier</string>
354+
<key>IASKWebViewShowProgress</key>
355+
<true/>
356+
</dict>
357+
<dict>
358+
<key>File</key>
359+
<string>https://www.futuretap.com</string>
360+
<key>IASKViewControllerClass</key>
361+
<string>IASKAppSettingsWebViewController</string>
362+
<key>IASKViewControllerSelector</key>
363+
<string>initWithFile:specifier:</string>
364+
<key>Title</key>
365+
<string>WebView with navigational buttons</string>
366+
<key>IASKSubtitle</key>
367+
<string>use IASKWebViewShowNavigationalButtons</string>
368+
<key>Type</key>
369+
<string>PSChildPaneSpecifier</string>
370+
<key>IASKWebViewShowNavigationalButtons</key>
371+
<true/>
372+
</dict>
373+
<dict>
374+
<key>File</key>
375+
<string>https://www.futuretap.com</string>
376+
<key>IASKViewControllerClass</key>
377+
<string>IASKAppSettingsWebViewController</string>
378+
<key>IASKViewControllerSelector</key>
379+
<string>initWithFile:specifier:</string>
380+
<key>Title</key>
381+
<string>WebView with all the above options</string>
382+
<key>Type</key>
383+
<string>PSChildPaneSpecifier</string>
384+
<key>IASKWebViewShowNavigationalButtons</key>
385+
<true/>
386+
<key>IASKWebViewShowProgress</key>
387+
<true/>
388+
<key>IASKWebViewHideBottomBar</key>
389+
<true/>
390+
</dict>
323391
<dict>
324392
<key>Title</key>
325393
<string>TextField</string>

InAppSettingsKitSampleApp/Settings.bundle/Root~iphone.inApp.plist

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,74 @@
322322
<key>IASKChildTitle</key>
323323
<string>ABOUT_TITLE</string>
324324
</dict>
325+
<dict>
326+
<key>File</key>
327+
<string>settings_about.html</string>
328+
<key>IASKViewControllerClass</key>
329+
<string>IASKAppSettingsWebViewController</string>
330+
<key>IASKViewControllerSelector</key>
331+
<string>initWithFile:specifier:</string>
332+
<key>Title</key>
333+
<string>WebView without tab bar (when pushed)</string>
334+
<key>IASKSubtitle</key>
335+
<string>use IASKWebViewHideBottomBar</string>
336+
<key>Type</key>
337+
<string>PSChildPaneSpecifier</string>
338+
<key>IASKChildTitle</key>
339+
<string>ABOUT_TITLE</string>
340+
<key>IASKWebViewHideBottomBar</key>
341+
<true/>
342+
</dict>
343+
<dict>
344+
<key>File</key>
345+
<string>https://www.futuretap.com</string>
346+
<key>IASKViewControllerClass</key>
347+
<string>IASKAppSettingsWebViewController</string>
348+
<key>IASKViewControllerSelector</key>
349+
<string>initWithFile:specifier:</string>
350+
<key>Title</key>
351+
<string>WebView with progress bar</string>
352+
<key>IASKSubtitle</key>
353+
<string>use IASKWebViewShowProgress</string>
354+
<key>Type</key>
355+
<string>PSChildPaneSpecifier</string>
356+
<key>IASKWebViewShowProgress</key>
357+
<true/>
358+
</dict>
359+
<dict>
360+
<key>File</key>
361+
<string>https://www.futuretap.com</string>
362+
<key>IASKViewControllerClass</key>
363+
<string>IASKAppSettingsWebViewController</string>
364+
<key>IASKViewControllerSelector</key>
365+
<string>initWithFile:specifier:</string>
366+
<key>Title</key>
367+
<string>WebView with navigational buttons</string>
368+
<key>IASKSubtitle</key>
369+
<string>use IASKWebViewShowNavigationalButtons</string>
370+
<key>Type</key>
371+
<string>PSChildPaneSpecifier</string>
372+
<key>IASKWebViewShowNavigationalButtons</key>
373+
<true/>
374+
</dict>
375+
<dict>
376+
<key>File</key>
377+
<string>https://www.futuretap.com</string>
378+
<key>IASKViewControllerClass</key>
379+
<string>IASKAppSettingsWebViewController</string>
380+
<key>IASKViewControllerSelector</key>
381+
<string>initWithFile:specifier:</string>
382+
<key>Title</key>
383+
<string>WebView with all the above options</string>
384+
<key>Type</key>
385+
<string>PSChildPaneSpecifier</string>
386+
<key>IASKWebViewShowNavigationalButtons</key>
387+
<true/>
388+
<key>IASKWebViewShowProgress</key>
389+
<true/>
390+
<key>IASKWebViewHideBottomBar</key>
391+
<true/>
392+
</dict>
325393
<dict>
326394
<key>Title</key>
327395
<string>TextField</string>

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)