![]() The Settings page file containing the preferences for the root page. Table 4-2 Contents of the Settings.bundle directory Table 4-2 lists the contents of a typical Settings bundle. It may also include other support files needed to display your preferences, such as images or localized strings. This bundle contains one or more Settings page files that describe the individual pages of preferences. The Settings BundleĪ Settings bundle has the name Settings.bundle and resides in the top-level directory of your app’s bundle. To learn how to create and edit Settings page files, see Creating and Modifying the Settings Bundle. The key for this type is PSChildPaneSpecifier.įor detailed information about the format of each preference type, see Settings Application Schema Reference. For more information on how you configure and use this preference type, see Hierarchical Preferences. You use this type to implement hierarchical preferences. ![]() The child pane type lets the user navigate to a new page of preferences. The key for this type is PSGroupSpecifier. It simply contains a title string that is displayed immediately before one or more configurable preferences. The group type does not represent a configurable preference. The group type is for organizing groups of preferences on a single page. The key for this type is PSMultiValueSpecifier. You can use this type for a preference that supports a set of mutually exclusive values. The multivalue type lets the user select one value from a list of values. The key for this type is PSSliderSpecifier. The value for this type is a real number whose minimum and maximum value you specify. You can use this type for a preference that represents a range of values. The slider type displays a slider control. The key for this type is PSToggleSwitchSpecifier. Although you typically use this type to represent preferences containing Boolean values, you can also use it with preferences containing non-Boolean values. You can use this type to configure a preference that can have only one of two values. The toggle switch type displays an ON/OFF toggle button. The key for this type is PSTitleValueSpecifier. (If the preference contains cryptic or nonintuitive values, this type lets you map the possible values to custom strings.) You can use this type to display read-only preference values. The title type displays a read-only string value. The key for this type is PSTextFieldSpecifier. You can use this type for preferences that require the user to specify a custom string value. The text field type displays a title (optional) and an editable text field. The table also lists the raw key name stored in the configuration files of your Settings bundle. Table 4-1 lists the types of controls supported by the Settings app and describes how you might use each type. The contents of each page consists of one or more controls that you configure. There is no specific limit to the number of child pages you can create, but you should strive to keep your preferences as simple and easy to navigate as possible. If the number of preferences gets too large to fit on the main page, however, you can create child pages that link off the main page or other child pages. If your app has only a few preferences, the main page may be the only one you need. Selecting a third-party app takes the user to the preferences for that app.Įvery app with a Settings bundle has at least one page of preferences, referred to as the main page. The main page of the Settings app lists the system and third-party apps whose preferences can be customized. The Settings app implements a hierarchical set of pages for navigating app preferences. The Settings app uses this information to create an entry for your app and to display your custom preference pages.įor guidelines on how to manage and present settings and configuration options, see iOS Human Interface Guidelines. A Settings bundle contains files that describe the structure and presentation style of your preferences. This chapter focuses on the creation of a Settings bundle for your app. Regardless of how you present them, you use the NSUserDefaults class to access preference values from your code. However, games and other apps that contain configuration options or other frequently accessed preferences might want to present them inside the app instead. The Settings bundle is generally the preferred mechanism for displaying preferences. Which option you choose depends on how you expect users to interact with preferences. Use a Settings bundle to manage preferences from the Settings app. Apps then have two options for presenting preferences: In iOS, the Foundation framework provides the low-level mechanism for storing the preference data. Next Previous Implementing an iOS Settings Bundle
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |