You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ IASK not only replicates the feature set of system settings but supports a large
19
19
20
20
-[How does it work?](#how-does-it-work)
21
21
-[How to include it?](#how-to-include-it)
22
+
-[Sample application](#sample-application)
22
23
-[App Integration](#app-integration)
23
24
-[Goodies](#goodies)
24
25
- [Custom inApp plists](#custom-inapp-plists)
@@ -77,6 +78,18 @@ Add to your `Cartfile`:
77
78
78
79
github "futuretap/InAppSettingsKit" "master"
79
80
81
+
82
+
# Sample application
83
+
84
+
InAppSettingsKit contains an Xcode sample application, that demonstrates all of it's extensive features. Both for a push and modal view controller.
85
+
To run the sample application:
86
+
87
+
1. From the project root folder, open `InAppSettingsKit.xcworkspace` in Xcode.
88
+
2. Change the scheme to `Sample App` (Product > Scheme > Sample App).
89
+
3. Select a destination, like an iPhone Simulator.
90
+
4. To build and run the application, choose Product > Run, or click the Run button in the Xcode toolbar.
91
+
92
+
80
93
# App Integration
81
94
82
95
In order to start using IASK add `Settings.bundle` to your project (`File` -> `Add File` -> `Settings bundle`) and edit `Root.plist` with your settings (see Apple's documentation on the [Schema File Root Content](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html)). Read on to get insight into more advanced uses.
- Set the delegate comforming to `IASKAppSettingsViewControllerDelegate`.
148
161
- Implement the delegate method `-settingsViewControllerDidEnd:` and dismiss the view controller.
149
162
150
-
The sample application shows how to wire everything up.
163
+
The [sample application](#sample-application) shows how to wire everything up.
151
164
152
165
**Additional changes**
153
166
@@ -182,7 +195,7 @@ If the app includes a usage key for various privacy features such as camera or l
182
195
183
196
If you don't want to show Privacy cells, set the property `neverShowPrivacySettings` to `YES`.
184
197
185
-
The sample app defines `NSMicrophoneUsageDescription` to let the cell appear. Note that the settings page doesn't show any privacy settings yet because the app doesn't actually access the microphone. Privacy settings only show up in the Settings app after first use of the privacy-protected API.
198
+
The [sample application](#sample-application) defines `NSMicrophoneUsageDescription` to let the cell appear. Note that the settings page doesn't show any privacy settings yet because the app doesn't actually access the microphone. Privacy settings only show up in the Settings app after first use of the privacy-protected API.
186
199
187
200
188
201
## Open URL
@@ -207,7 +220,7 @@ InAppSettingsKit adds a `IASKButtonSpecifier` element that allows to call a cust
The sender is always an instance of `IASKAppSettingsViewController`, a `UIViewController` subclass. So you can access its view property (might be handy to display an action sheet) or push another view controller. Another nifty feature is that the title of IASK buttons can be overriden by the (localizable) value from `NSUserDefaults` (or any other settings store - see below). This comes in handy for toggle buttons (e.g. Login/Logout). See the sample app for details.
223
+
The sender is always an instance of `IASKAppSettingsViewController`, a `UIViewController` subclass. So you can access its view property (might be handy to display an action sheet) or push another view controller. Another nifty feature is that the title of IASK buttons can be overriden by the (localizable) value from `NSUserDefaults` (or any other settings store - see below). This comes in handy for toggle buttons (e.g. Login/Logout). See the [sample application](#sample-application) for details.
211
224
212
225
By default, Buttons are aligned centered except if an image is specified (default: left-aligned). The default alignment may be overridden.
213
226
@@ -298,7 +311,7 @@ For footer customization, three methods from the `IASKSettingsDelegate` protocol
298
311
## Extending Child Panes
299
312
300
313
### Custom ViewControllers
301
-
For child pane elements (`PSChildPaneSpecifier`), Apple requires a `file` key that specifies the child plist. InAppSettingsKit allow to alternatively specify `IASKViewControllerClass` and `IASKViewControllerSelector`. In this case, the child pane is displayed by instantiating a UIViewController subclass of the specified class and initializing it using the init method specified in the `IASKViewControllerSelector`. The selector must have two arguments: an `NSString` argument for the file name in the Settings bundle and the `IASKSpecifier`. The custom view controller is then pushed onto the navigation stack. See the sample app for more details.
314
+
For child pane elements (`PSChildPaneSpecifier`), Apple requires a `file` key that specifies the child plist. InAppSettingsKit allow to alternatively specify `IASKViewControllerClass` and `IASKViewControllerSelector`. In this case, the child pane is displayed by instantiating a UIViewController subclass of the specified class and initializing it using the init method specified in the `IASKViewControllerSelector`. The selector must have two arguments: an `NSString` argument for the file name in the Settings bundle and the `IASKSpecifier`. The custom view controller is then pushed onto the navigation stack. See the [sample application](#sample-application) for more details.
302
315
303
316
### Using Custom ViewControllers from StoryBoard
304
317
Alternatively specify `IASKViewControllerStoryBoardId` to initiate a viewcontroller from [main storyboard](https://developer.apple.com/library/ios/documentation/general/conceptual/Devpedia-CocoaApp/Storyboard.html/).
@@ -357,7 +370,7 @@ MultiValue lists (`PSMultiValueSpecifier`) and radio groups (`PSRadioGroupSpecif
0 commit comments