iOS Setting Bundle:-
Actually sometimes we need to interact our app i.e giving some input value or changing some default value or use default value unless we are not changing that value in that case we need to create one app setting which will be outside the app but once we click on Setting in device we can navigate to Setting panel where we can get out app and we modify something there.Once we will come back to our app after Setting screen , can see the change .So here there are two major things first how to create Setting Bundle and then how to read the Setting Bundle value in our app (app delegate).
Control type
|
Description
|
---|---|
Text field
|
The text field type displays a title (optional) and an editable text field. You can use this type for preferences that require the user to specify a custom string value.
The key for this type is
PSTextFieldSpecifier . |
Title
|
The title type displays a read-only string value. You can use this type to display read-only preference values. (If the preference contains cryptic or nonintuitive values, this type lets you map the possible values to custom strings.)
The key for this type is
PSTitleValueSpecifier . |
Toggle switch
|
The toggle switch type displays an ON/OFF toggle button. You can use this type to configure a preference that can have only one of two values. Although you typically use this type to represent preferences containing Boolean values, you can also use it with preferences containing non-Boolean values.
The key for this type is
PSToggleSwitchSpecifier . |
Slider
|
The slider type displays a slider control. You can use this type for a preference that represents a range of values. The value for this type is a real number whose minimum and maximum value you specify.
The key for this type is
PSSliderSpecifier . |
Multivalue
|
The multivalue type lets the user select one value from a list of values. You can use this type for a preference that supports a set of mutually exclusive values. The values can be of any type.
The key for this type is
PSMultiValueSpecifier . |
Group
|
The group type is for organizing groups of preferences on a single page. The group type does not represent a configurable preference. It simply contains a title string that is displayed immediately before one or more configurable preferences.
The key for this type is
PSGroupSpecifier . |
Child pane
|
The child pane type lets the user navigate to a new page of preferences. You use this type to implement hierarchical preferences. For more information on how you configure and use this preference type.
The key for this type is
PSChildPaneSpecifier . |
NSString *kFirstNameKey= @”name_p_preference”;
NSString *defaultterminalval = [[NSUserDefaults standardUserDefaults] stringForKey:kFirstNameKey];
//here we can store this defaultterminalval to use somewhere else as per our need
}